C:\windows\system32>mklink /D U:\"Mobile Apps"\Repos C:\Users\LeiceJ\Source\Repos
The system cannot find the path specified.
I'm trying to set up a symbolic link so that I can access my Repository folder from the network drive. As Visual studio doesn't like network drives, I need to store things locally, but I'll be working from various computers in a network, so the only consistent file structure I'll have is the network drive. To prevent having to constantly dig through C drive folders every time I want to open anything, I want to create a symbolic link to the Repos folder.
Every time I try to create the link, I get this The system cannot find the path specified.
error. The paths exist, both are correct. The only thing I can think might be throwing it off is that the link is from a network drive.
That's all about how to solve "The system cannot find the path specified." error while running the program from the command prompt. The root cause of this error is invalid directories, sub-directories in the PATH environment variable, just remove them and the error will be solved.
I think that the problem is because your link is an arborescence and that you are using the /D
in place of /J
, which can handle network locations.
"u:\mobile apps\repos"
contains 2 folders (mobile apps & Repos)
It seems that mklink
can't create 2 folders. So if you try so:
mklink /J "U:\Mobile Apps" C:\Users\LeiceJ\Source\Repos
it will work.
You can also manually create a folder named "mobile apps" and then it will work.
Another point: it seems that you inverted the target with the link (but not sure). If you want to point the drive map U:
as target when you enter "C:\Users\LeiceJ\Source\Repos"
, you need to invert the two parameters in your command.
TL;DR: Prefer mklink /J
for this kind of manipulation, it handles network location.
I ran into this same issue when I was trying to change the backup location for my iPhone because my C:/ drive was too full and my backup took up at least 20gbs so I wanted to move it to my extra hard drive (X:/). After attempting to do this over 20 times and continuous Googling, I found this article to be VERY helpful. This was specifically for changing the back up location for devices in iTunes but the steps should be very similar.
Steps:
Example:
MkLink /J "%APPDATA%\Apple Computer\MobileSync\Backup" "D:\Backup"
Manually typing out the cmd command above. Yes, I know, it sounds crazy. However, try actually typing it out. This resolved my issue with the "path not specified". I typed out the exact same command that I was copy/pasting and it worked only when I manually typed it out.
Opening the command prompt from the folder location (step 2). This also helped resolve the "path not specified" error for me.
Making sure the original linked directory location did not exist already as a mapped directory will be created with the same name.
For reference: I'm using a desktop PC running Windows 7 64-bit.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With