15

I am trying to create a hardlink on my C drive that points to a file on my D drive. I open up a terminal with Administrator privileges and try the following:

C:\Users\sandro>mklink /H _vimrc D:\sandro-desktop\.vimrc

The error that I get is:

The system cannot move the file to a different disk drive.

When I try a softlink I get the issue that for some reason changes to the link contents aren't reflected on the targeted file.

bad_coder
  • 649
Sandro
  • 539

3 Answers3

22

A hard link is a file system feature that cannot cross a file system boundary. You can't hard link files on C: to D: because they are separate file systems. They might each contain the same type of file sytem (eg. NTFS) but they are separate file systems.

3

If it's Windows 7, you can use symlinks - Steam Mover does just that.

bad_coder
  • 649
Journeyman Geek
  • 133,878
-3

Try this:

mklink /H "C:\Users\sandro_vimrc" "D:\sandro-desktop\.vimrc"

I'm guessing this has something to do with the filename of the target. Try using quotes around the target link.

I think your link has to be a full path as well.