View Single Post
  #2 (permalink)  
Old 07-24-2007, 06:00 AM
oxygen oxygen is offline
D-Web Architect
 
Join Date: Jun 2007
Posts: 633
oxygen is on a distinguished road
Default Re: How to check a particular folder exsist or Not using c#?

How to check a particular folder using c#?

private bool CheckFolder(string targetFolder)

{
bool folderExists = Directory.Exists(targetFolder);
if (!folderExists)
{
do something
}
else if (folderExists = "myfolderName")

{
DeleteFile(@\\myfolderName\);

}
return folderExists;

}
Reply With Quote