이런 초보적인... ^^;
Directory 생성후 생성한 폴더에 작업시 오류가 발생한다면...
if (!Directory.Exists(directoryName))
{
Directory.CreateDirectory(target.FullName);
Thread.Sleep(100);
}
또는
if (!Directory.Exists(directoryName)) Directory.CreateDirectory(directoryName);
int i = 0;
while (true)
{
if (Directory.Exists(directoryName))
break;
Thread.Sleep(100);
i++;
if (i > 10) break;
}
행복한 고수되셔요. ^^
woojja ))*
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
반응형
'.NET > C#' 카테고리의 다른 글
[C#] Logging on File (0) | 2017.10.24 |
---|---|
[C#] How do you check if a file is in use? (0) | 2017.07.27 |
[C#] 단일 Process 실행 (2) | 2010.11.08 |
[C#] C# 은 VB.NET 따라쟁이... (3) | 2009.05.07 |
[C#] C# 컴파일러 오류 (0) | 2009.03.06 |