I've no problem in creating junctions and symbolic links through mklink, but can't create hard link using this command. It returns "Access denied", have tried on both Windows 7 and 8.1 on different machines, cmd started with administrative privileges.
D:\>mklink /d /h dirA dirB
Of course dirB exists. Is there something I should do to run this command without error?
Best Answer
I'm pretty sure you can't create a hard link to a folder, only files. Symbolic links
/D
and junctions/J
would work for folders though.Also when creating hard links, keep in mind that you cannot create links between 2 different drives (even on the same physical hard drive).
A short explanation from another SU answer: