4

When I do this command:

mklink /D "C:\Users\user\Desktop\MyDocs\VSCode" "C:\Users\user\.vscode"

I get the error : "The system cannot find the path specified."

I run cmd as admin.
I am able to create Symbolic Link Directory for others folders.
I have followed the recommandation on this question.
I am able to move to the .vscode with cd C:\Users\user\.vscode and to list its content with dir.

C:\Users\user\.vscodeis a hidden folder.
I am on Windows 10.

MagTun
  • 1,498
  • Question: ls is not a Windows command, so how are you doing the mklink? – harrymc Oct 09 '18 at 11:15
  • ls worked for me on a regular (not admin) cmd (maybe because I installed git repo : https://superuser.com/questions/1248999/why-does-ls-work-on-my-cmd-windows). I am doing the mklink by copying the command in my question in a cmd started as admin. (I am on windows 10) – MagTun Oct 09 '18 at 11:21
  • I change ls to dir to avoid the confusion. – MagTun Oct 09 '18 at 11:31
  • 1
    Try to first cd "C:\Users\user\Desktop\MyDocs\" and then "mklink /D VSCode "C:\Users\user.vscode". If that fails, I haven't found any reason for it, but you might try to unhide.vscode`. – harrymc Oct 09 '18 at 12:18
  • Yeah, it's working. Post it as an answer, I will upvote it. – MagTun Oct 09 '18 at 12:25
  • Done as requested. – harrymc Oct 09 '18 at 12:28

1 Answers1

4

This might work better :

cd "C:\Users\user\Desktop\MyDocs\"
mklink /D VSCode "C:\Users\user\.vscode"
harrymc
  • 480,290