title: How to Move File and Rename it in C#, after receiving it from the server?
body: <p>I am trying to move&amp;rename a file which i received from my TCPserver. </p>
  
  <p>My code for moving and renaming:</p>
  
  <pre><code> *//My sourcePath*
   static string myServerfile = @"C:\Users\me\Documents\file_client\bin\Debug\test1.txt";
   *//My destinationPath*
   static string myFile = @"C:\test\inbox\JobStart.txt";
  </code></pre>
  
  <p>After receiving the file I do this:</p>
  
  <pre><code>          fs.Close ();
            serverStream.Close ();
                  File.Move(myServerfile, myFile);
                  Console.WriteLine("Moved");
              } 
              catch (Exception ex) 
              {
                  Console.WriteLine ("Cannot be DONE!");  
              }
  </code></pre>
  
  <p>But it allways throws exception "Cannot be done" when it reaches <code>File.Move(myServerfile, myfile1);</code></p>
  
  <p>I tried this:
  <code>Console.WriteLine(ex.ToString());</code></p>
  
  <p>Result:
  <em>System.IO.IOException: A file that already exists, can not be created.</em></p>
  
  <p><img src="https://i.stack.imgur.com/G9hRf.jpg" alt="enter image description here"></p>
  
  <p>What am i doing wrong? </p>