title: How do I move a file to a directory and not replacing a file?
body: <p>I'm trying to move a file from the desktop to a directory called "Textfiles" but every time I try to it gives me this error.</p>
  
  <blockquote>
    <p>Additional information: The target file  "C:\Users\Developer\Documents\Textfiles" is a directory, not a file.</p>
  </blockquote>
  
  <p>Now I know that using</p>
  
  <pre><code>File.Copy(fileName, targetPath);
  </code></pre>
  
  <p>Would be wrong and that's what I am using right now, It takes two parameters, the first being the file yopu want to copy and the second one being the file it's replacing? Correct me if i am wrong on the second parameter.</p>
  
  <p>Anyways, I tried <code>System.IO.Directory.Move(fileName, destFile);</code> aswell but that pretty much gave me the same error.</p>
  
  <p>The two parameters are very simple, just two string that consists of paths.</p>
  
  <pre><code>string fileName = filePath.ToString();
  string targetPath = @"C:\Users\Developer\Documents\Textfiles";
  </code></pre>
  
  <p>What would be the correct way to transfer fileName to targetPath ?</p>