I need to find a way to copy/move a symlink/junction from my C: to a network drive.
I am able to create the symlink with MKLINK command but I can't move it to my UNC folder where I need it.
If I try to create it in the UNC folder MKLINK will fail, if I try to XCOPY /b /i I get an error message and the file is not copied.
Of course I can always use Windows Explorer and drag/drop or copy/paste or cut/paste but this is something I need to automate in a batch script.
Symlinks are disk dependent.
A hard link is the file system representation of a file by which more than one path references a single file in the same volume.
A junction (also called a soft link) differs from a hard link in that the storage objects it references are separate directories, and a junction can link directories located on different local volumes on the same computer. Otherwise, junctions operate identically to hard links. Soft links are implemented through reparse points.
From Windows Vista SDK. If you have it installed Hardlinks and Junctions ms-help://MS.MSSDK.1033/MS.WinSDK.1033/fileio/fs/hard_links_and_junctions.htm
Here's something from another of my post's explaining how all files in system32 have two hardlinks (because explorer/cmd shows windows using a few gig more than it actually does).
The point is it stored in the folder file. It's can't be on another disk. Reparse points run code when accessed. For some reason the code allows other drives but not remote.
See if this helps
or use a shortcut.