(Windows 10) Symbolic link failing, claims “system cannot find specified path”

command linemklinksymbolic-linkwindows 10

I am trying to create a symbolic link between %ProgramData%\PopCap Games\Insaniquarium and %ProgramData%\Steam\Insaniquarium to fix compatibility problems with the game Insaniquarium, however, the symbolic link is failing with the error message System cannot find specified path:

mklink /J "C:\ProgramData\PopCap Games\Insaniquarium" "C:\ProgramData\Steam\Insaniquarium"
  • I previously ran this command in another Windows 10 installation and got it to work, though currently I can't remember how, or rather, if I ran into this problem back then as well
  • I have already tried to run it with Cmd, Cmd as Admin, and PowerShell, with all resulting in the same problem
  • I tried running cmd directly from the intended folder itself, yet it somehow can't find it, even then! I don't know how I could possibly make the folder "visible" to Cmd, as it's not hidden or anything.

POST-RESOLUTION EDIT:
Okay, so because this apparently confused a lot of people, I want to clarify that I was, in fact, making sure there wasn't a folder named the same as the symlink in the target directory. The problem was that I was doing this by deleting the parent folder as well, which I now realize I shouldn't do. So the problem had nothing to do with the presence of a folder with the same name, that wasn't the issue, please pay more attention to the way the person is describing their problem next time. Simply noting the error message described at the beginning of the question would've been a hint that the solution involved the absence of the parent folder.

Best Answer

Creating a Junction or a Directory Symbolic Link requires the target to not exist; in your example, directory C:\ProgramData\PopCap Games\Insaniquarium cannot exist:

mklink /J "C:\ProgramData\PopCap Games\Insaniquarium" "C:\ProgramData\Steam\Insaniquarium"

The solution is:

  1. Rename it something else [ZZ]
  2. Make the Junction
  3. Copy files from ZZ to C:\ProgramData\PopCap Games\Insaniquarium
Related Question