title: File.Move Error - System.IO.FileNotFoundException: Could not find file 'c:\windows\system32\inetsrv
body: <p>I have no idea why I'd get this error below.  The filevPath when I debug is a completely valid (yes, the physical the image is definitely there physically on the hard drive in the filePath variable that is being passed) path and obviously is not the same path as the error is reporting which looks like some generic error:</p>
  
  <p>System.IO.FileNotFoundException: Could not find file 'c:\windows\system32\inetsrv\someimage1.jpg'</p>
  
  <pre><code>private void RenameUploadedFile(string uploadedFileName)
  {
      string filePath = Path.Combine(WebUtil.UploadPath, uploadedFileName);
  
      if (File.Exists(filePath))
      {
          try
          {
              string newfileName = uploadedFileName.Replace(uploadedFileName.Substring(0, uploadedFileName.IndexOf("-")), currenSessionID);
              File.Move(uploadedFileName, newfileName);
          }
          catch (Exception ex)
          {
              .ErrorLog("Image Copy Error: " + ex.ToString());
              throw new ApplicationException("There was an error during a rename(move) operation on the Saved Item upload file: " + filePath + " error: " + ex.ToString());
          }
      }
      else
      {
          .ErrorLog("File does not exist or path is invalid for at the following filepath: " + filePath);
      }
  }
  </code></pre>