title: Take the space out of file names and or replace character with something else
body: <p>Im trying to remove the spaces out of a bunch of file names(pdf's in a directory). I have tried the following. both input and output directories are folderbrowserdialog box's</p>
  
  <pre><code>DirectoryInfo di = new DirectoryInfo(folderBrowserDialog1.SelectedPath);
  foreach (var file in di.GetFiles())
  {
       try
       {
          File.Copy(file.FullName, outputDir + @"\" + file.Replace(" ", "_"));        
       }
  }
  </code></pre>