title: How to check if a file exists in a folder?
body: <p>I need to check if an xml file exists in the folder.</p>
  
  <pre><code>DirectoryInfo di = new DirectoryInfo(ProcessingDirectory);
  FileInfo[] TXTFiles = di.GetFiles("*.xml");
  if (TXTFiles.Length == 0)
  {
      log.Info("no files present")
  }
  </code></pre>
  
  <p>Is this the best way to check a file exists in the folder.</p>
  
  <p>I need to check just an xml file is present</p>