Windows 7 Forums
Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: Symbolic folder linking


07 Mar 2011   #1

Windows 7 Ultimate 64 bit
 
 
Symbolic folder linking

Hello, I need a bit of help with creating a symbolic link between two folders. I tried mklink but it gives me incorrect syntax error. In windows 7 of course.

I have one empty folder, C:\link\empty folder, and one folder with files in it, C:\link\files

I want C:\link\empty folder to always point to the target C:\link\files, sounds simple but I'm not well versed at doing this sort of thing..


My System SpecsSystem Spec
.

12 Mar 2011   #2

Windows 7 Ultimate x64
 
 

Easy
Run Command Prompt with Admin rights

Issue the command
Mklink /j "c:/folder/files" "c:/folder/empty"

The option /j will create the link although some swear by using option /d. I'm not sure the differences but /j works for me.
My System SpecsSystem Spec
13 Mar 2011   #3

Windows 7 Ultimate 64 bit
 
 

Quote   Quote: Originally Posted by habibi View Post
Easy
Run Command Prompt with Admin rights

Issue the command
Mklink /j "c:/folder/files" "c:/folder/empty"

The option /j will create the link although some swear by using option /d. I'm not sure the differences but /j works for me.
Unfortunately this gave me an error message, Cannot create a file when that file already exists
My System SpecsSystem Spec
.


13 Mar 2011   #4

Windows 7 Ultimate 64 bit
 
 

I am trying to link a normally empty folder to a folder that has files in it, So that folder A (which is empty), should simply redirect to folder B (the one with files in it). Folder A in all intents and purpose is sort of like an alias folder.
My System SpecsSystem Spec
13 Mar 2011   #5

Windows 7 Ultimate x64
 
 

In the mklink command, you don't need to create Folder A. Once you issue the command, a shortcut (Folder A alias) is created. So, that alias is created by the command. In your case, your error is because that folder exist since you created it prior to issuing the command.
My System SpecsSystem Spec
14 Mar 2011   #6

Windows 7 Ultimate 64 bit
 
 

Finally success! All tested and working perfectly... now I don't have to have 2 copies of the same folder and files when I log on to server 1 or 2 and it checks for the appropriate folder/files...

The documentation is poor on the use of these commands. For instance, it does not say in the MS docs that you have to put " " quotes around both the folder locations in the command statement in order for syntax to be correct. Secondly it poorly describes where you place the folder name to be created and the hard folder (already existing) that your linking to...

I believe it ended up working like this: Mklink /d "c:/folder/empty" "c:/folder/files". The "empty" folder was non-existent and created with the command, while the "files" folder was the actual folder with the files in it....

Hope this makes sense...
My System SpecsSystem Spec
14 Mar 2011   #7

Windows 7 Ultimate x64
 
 

Makes sense. That's how it worked for me.
Specifically, I was trying to move a few of my Steam games from my harddisk (d: ) to my SSD disk (c: ).
So I used mklink. Sorry that I wasn't clear in my explanation.
My System SpecsSystem Spec
Reply

 Symbolic folder linking




Thread Tools



Similar help and support threads for2: Symbolic folder linking
Thread Forum
Is it possible to Create a Symbolic Link to a Non-Specific Directory? General Discussion
Change folder/file location - use Move, Symbolic link or Junction? General Discussion
Symbolic Link not working General Discussion
Linking "Sent Items" folder Browsers & Mail
Directory junction/symbolic link not working General Discussion
Symbolic File Folder with Specified File Types? Software
Symbolic link across drives? General Discussion

Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 04:15 PM.
Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App
  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33