I need to check if an xml file exists in the folder.
DirectoryInfo di = new DirectoryInfo(ProcessingDirectory); FileInfo[] TXTFiles = di.GetFiles(\"*.xml\");
This way we can check for an existing file in a particular folder:
string curFile = @"c:\temp\test.txt"; //Your path Console.WriteLine(File.Exists(curFile) ? "File exists." : "File does not exist.");