2

Scenario:

  1. Create SymLink: C:\Data\workspaces --> C:\Users\****\Documents\workspaces
  2. Navigate to C:\Data\Workspaces in explorer
  3. Click and drag the the path from the address bar onto "Quick Access" in the navigation pane.

Expected Result:

  • Clicking on the shortcut takes you to C:\Data\workspaces

Actual Result:

  • Clicking on the shortcut takes you to C:\Users\****\Documents\workspaces

How do you make it so that the shortcut points to the correct path. (the SymLink)

Command Used to create the SymLink:

mklink /D C:\Data\workspaces C:\Users\****\Documents\workspaces

Updated with pictures:

Please note the workspaces symlink inside C:\Data:

enter image description here

When I double-click on the symlink it works correctly. (note the address bar.

enter image description here

When i pin it to the Quick access bar, however, it uses the address that the symlink points to and NOT the symlink address.

enter image description here

4
  • Right click on document folder and change its location to your working folder. No need to create symlink. – Biswapriyo Jun 1 '17 at 15:26
  • Biswa - I didn't create the symlink to put it on the quicklist. This issue is that bookmarking the symlink url on the quicklist gets translated automatically to the referenced directory, which I don't want. – ScrappyDev Jun 1 '17 at 23:05
  • Symlinks are used so that programs assume the symlink as a actual folder but really they are pointed to elsewhere. So if you open that symlink in quick access explorer will open C:\Users\****\Documents\workspaces but really they are pointed to C:\Data\workspaces. – Biswapriyo Jul 1 '17 at 8:42
  • I know what it is for. You are misunderstanding the issue. When you go to a symlink, it will act as if the alias path is a real path even though it is not a real directory. However if you pin the symlink, it doesn't behave this way, it will take you to the liked path instead of the actual path. (it behaves like a shortcut instead of a symlink.) – ScrappyDev Jul 5 '17 at 13:46
2

To prevent a symbolic link from being translated, you have to trick Windows by first pinning a regular folder to Quick Access, and then replacing it with a symbolic link.

mkdir symlink

then pin this to quick access using File explorer

rmdir symlink
mklink /d symlink "\\host\path\to\directory"

Partly copied from my blog: https://coertvonk.com/hw/logic/quartus-cycloneiv-de0nano-15932

2
  • This works beautifully. Note that you may need administrator privileges to run mklink. Open cmd by right clicking it and selecting "Run as Administrator". – sfscs Jan 24 '20 at 3:47
  • You have to "rmdir symlink", not delete it in Explorer, or it won't work – jw_ Mar 9 '20 at 12:53
0

In mklink:

/D Creates a directory symbolic link.

/J Creates a Directory Junction.

Here is the detail about the switches of mklink.

In your case, just replace /D with /J, for example:

mklink /J C:\Data\workspaces C:\Users\****\Documents\workspaces

This problem not only happened on Quick Access. For example, after you added a program as windows service, even the program path pointed to the link of symbolic link, the Service Manager still showing the target of symbolic in the service list.

3
  • Welcome to Super User. Your answer would be made better by explaining what this switch does and why it stopped the OP's problem. – I say Reinstate Monica Mar 29 '19 at 9:49
  • You are right, thinks for your comment. – Peter Chao Mar 31 '19 at 4:25
  • As soon as I'm able to test and verify this on Windows 10, I'll mark this as the solution. – ScrappyDev Apr 2 '19 at 2:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.