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
Lee K

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
habibi

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
Lee K

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
Lee K

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
habibi

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
Lee K

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
habibi

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
Thread Forum
Please help me set up symbolic links in Windows 7
Hi, I have thoughT about using symbolic links in my system for the data I store from my Android devices. I have read about it on internet and I understand that there are several ways to create them. Which way is the better one? The DOS method or the method using 3rd party applications? What are...
General Discussion
Change folder/file location - use Move, Symbolic link or Junction?
I've finished a new build that uses a SSD as the system drive (and some programs) and has a secondary HDD. I'm just getting ready to add programs and move data (documents, photos, music, etc.) to the new system. First time SSD user and have done most of the suggested configurations to prolong...
General Discussion
Symbolic Link not working
Hello, I recently got a small sdd for my system. However, being a heavy gamer, my appdata folder is starting to get quite large and I do not want to "waste" all the writes on my sdd. I used this guide to move my entire user file over....
General Discussion
Linking "Sent Items" folder
I have added several email addresses, ie. gmail and hotmail. When I send a message it does not show in the "Sent Items" folder. I have been searching for an answer here, but to no avail. Can anyone help me in the least technical manner. Thanks
Browsers & Mail
Symbolic File Folder with Specified File Types?
I'm sure there's a way to do this, but it's out of my realm of digging in windows. What I need essentially is a Symbolic Folder that will scan a set directory and only return specific file types. For example, I have five folders with .jpgs, .psds, and .txt. What I would like is to create a...
Software
Symbolic link across drives?
I am new to Windows 7 and new to using symlinks. Please bear with me. I am trying to make a hard link to a file on a RAM disk, but I get the error "The system cannot move the file to a different disk drive." I can't make a directory link to the RAM disk because I cannot fit all the files...
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 15:39.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App