I want to create a symbolic link betwee a folder on a network and a folder on the local drive using the following command;

mklink /d "\<networkName>\<folderA>\<folderB>" "C:\<folderA>\<folderB>\<folderC>"

I get the error; The file or directory is not a reparse point.

I did some searching online and didn't find much information on this error besides the tool, Junction which allows you to view reparse points. I prefer to do this within Windows ?

Dani AI

Generated

the mklink syntax is: link first, then target. For a network share, use a UNC path with backslashes and the directory switch. Example:

mklink /d "C:\folderA\folderB\folderC" "\\networkName\folderA\folderB"

The link path must not already exist; the target must exist and be reachable. UNC paths always start with two backslashes. Symbolic links can point directly to a UNC path, which is what you want here. (learn.microsoft.com)

About the "one of the links is a shortcut" confusion in your follow‑up: only the thing you create at C:... is a link (a reparse point). The network folder stays a normal folder. Explorer may show an overlay similar to a shortcut, but it is not a .lnk file. To verify, run dir /a:L "C:\folderA\folderB" and look for <SYMLINKD>, or query it directly: fsutil reparsepoint query "C:\folderA\folderB\folderC". If you see "The file or directory is not a reparse point," the path you queried is not actually a link. (learn.microsoft.com)

Also note the tool you choose matters. /d creates a directory symbolic link (works to UNC). /j creates a junction, which is limited to local volumes and cannot target mapped drives or network shares. If you accidentally made the wrong type, remove the link with rmdir "C:\folderA\folderB\folderC" and recreate it with /d. (learn.microsoft.com)

If you hit a privilege error, run the command in an elevated console or grant the "Create symbolic links" user right (Developer Mode removes this requirement for tools that opt in). (learn.microsoft.com)

Recommended Answers

All 4 Replies

Arghh, I was doing it in reverse, from a stackoverflow link I refreshed upon. Thanks :)

commented: Thanks for the report. Nice to know it heped. +12

Just to share a little more. From an article on Windows 10 Developer Mode, I think you may find this of interest.

In Windows 10’s Creators Update, putting your device into developer mode relaxes restrictions on creating symbolic links. Previously, it was only possible for Administrator users to create symlinks. This is still the case on Windows 10—unless you put it into Developer Mode.

In Developer Mode, a user account with any level of privileges can create symbolic links. In other words, you can open a normal Command Prompt window and use the mklink command. Outside of Developer Mode, you’d need to open a Command Prompt window as Administrator before using the mklink command.
From https://www.howtogeek.com/292914/what-is-developer-mode-in-windows-10/

Thanks for the info.

I have to re-surface this issue; sorry if I forgot something. When using mklink and placing the network path after and the local path first, the symbolic link gets created but one of the links is a short-cut ?

mklink /d "C:\<folderA>\<folderB>\<folderC>" "\<networkName>/<folderA>"

The source gets created as a shortcut ?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.