Why can't the system find the path specified when making a symbolic link? [closed]
Asked Answered
F

3

10

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.

Furious answered 17/8, 2016 at 3:21 Comment(1)
Better suited to superuser.com . Here's their solution. superuser.com/questions/210824/…Heal
P
2

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.

Pulpy answered 7/4, 2017 at 13:28 Comment(1)
I made some minor edits to your answer. I hope you like them. TL;DR stands for "Too long; didn't read", which is the standard Americanism for a summary that people who are in a hurry can skip to at the end of a detailed explanation.Capsicum
E
2

How to Resolve Issues Creating Symbolic Link Directory

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:

  1. Open File Explorer and navigate to folder location. The folder that you want to create a linked directory for should not be present. Press SHIFT key and right click in File Explorer middle view screen, you will get a pop-up menu.
  2. Select "Open command window here".
  3. Manually type in the following command where "D:\" is the new drive location (drive letter may vary) and "Backup" is the name of the folder you want to create a linked directory for.

Example: MkLink /J "%APPDATA%\Apple Computer\MobileSync\Backup" "D:\Backup"

What Solved My Issues

  • 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.

Eula answered 9/8, 2018 at 20:30 Comment(0)
M
-3

Your speech marks are in the wrong place.

U:\"Mobile Apps"\Repos

...should be this...

"U:\Mobile Apps\Repos"

Full command:

mklink /D "U:\Mobile Apps\Repos" C:\Users\LeiceJ\Source\Repos
Michell answered 17/8, 2016 at 11:55 Comment(1)
I've tried various placements.Furious

© 2022 - 2024 — McMap. All rights reserved.