title: Move a file to a different drive with Go
body: <p>I'm trying to move a file from my C-drive to my H-drive using os.Replace().</p>
  
  <p>The code looks as follows:</p>
  
  <pre><code>func MoveFile(source string, destination string) {
      err := os.Rename(source, destination)
      if err != nil {
          fmt.Println(err)
      }
  }
  </code></pre>
  
  <p>However, when I run the code I get the following error:</p>
  
  <pre><code>rename C:\old\path\to\file.txt H:\new\path\to\file.txt: The system cannot move the file to a different disk drive.
  </code></pre>
  
  <p>I found <a href="https://github.com/golang/go/issues/13766" rel="noreferrer">this</a> issue on GitHub that specifies the problem but it appears that they will not change this function to allow it to move file on different disk drives.</p>
  
  <p>I already searched for other possibilities to move files, but found nothing in the standard documentation or the internet.</p>
  
  <p>So, what should I do now to be able to move files on different disk drives?</p>