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: MKLINK Create and Use Links in Windows

20 Sep 2015   #110
JerometheGiraff

Windows 10 Pro
 
 

If the Target is the file / folder that exists, and the link is the created one that links to the target.

mklink /d "<target folder>" "<link to target>"

Why do I get the; cannot create file when that file already exists ?


My System SpecsSystem Spec
.
20 Sep 2015   #111
GokAy

Windows 7 Ultimate x64 SP1
 
 

It is the other way around:
<symb_link_folder> <source folder>
mklink /D C:\Work "%USERPROFILE%\desktop\folder"
My System SpecsSystem Spec
21 Sep 2015   #112
JerometheGiraff

Windows 10 Pro
 
 

Didn't work, same error; cannot create a file when that file already exists.
My System SpecsSystem Spec
21 Sep 2015   #113
GokAy

Windows 7 Ultimate x64 SP1
 
 

Trying to create at the same place of target folder? Copy paste the command you are trying to run.
My System SpecsSystem Spec
.

21 Sep 2015   #114
JerometheGiraff

Windows 10 Pro
 
 

mklink /d "<source folder>" "<target folder>"
mklink /d "<target folder>" "<source folder>"

For example; one sub-folder is nested three layers deep called "master files"
X:\Users\[folder]\[folder]\master_files

the next folder is located in X:\Master Files
My System SpecsSystem Spec
22 Sep 2015   #115
GokAy

Windows 7 Ultimate x64 SP1
 
 

Is there a folder with same name where you are trying to create perhaps? Can a symb link be hidden? It is possible link is there but hidden so any subsequent tries give you the error. See screenshot.

-mklink.jpg


My System SpecsSystem Spec
22 Sep 2015   #116
kado897

Microsoft Community Contributor Award Recipient

Microsoft Windows 7 Home Premium 64-bit Service Pack 1
 
 

You'll save youself a lot of heartache if you use this tool to create them.https://github.com/amd989/Symlinker
My System SpecsSystem Spec
22 Sep 2015   #117
JerometheGiraff

Windows 10 Pro
 
 

Kado - I know, I want to understand why the vanilla method won't work.

Gokay - The target folder does not have the same name as the source folder, but all the sub-folders of the source folder to which I want to link to the target folder must have the same name.

The target folder and the source folder should have the same name otherwise it would be pointless for what I'm trying to achieve unless it doesn't matter if the source and target folder name are different as long as the sub-folders remain the same; but I won't know if this is valid until I ever get the symbolic link to work ?
My System SpecsSystem Spec
22 Sep 2015   #118
GokAy

Windows 7 Ultimate x64 SP1
 
 

Quote:
Gokay - The target folder does not have the same name as the source folder, but all the sub-folders of the source folder to which I want to link to the target folder must have the same name.
Target folder does not need to have the same name as the source folder. You don't need to do anything to sub-folders, they are already there with their original names.

Quote:
The target folder and the source folder should have the same name otherwise
Now you are telling the opposite of what you said above.

You still have not told us exactly what you are trying to achieve.
Example: I want to move a program to another place without re-installing.
- I move the program's installation folder to the other place
- Create a symlink to the new location from the old one so any calls to the program gets re-directed to the new one seamlessly
- In this case symlink should be named same as the original folder but the relocated folder can be named anything
- Any subfolders are still accessible with the same Explorer address

Apparently you are at fault somewhere. Why not give the real folder structure and what goes where and some more detail instead of vague expressions, and then we can find out what's going on.
My System SpecsSystem Spec
22 Sep 2015   #119
kado897

Microsoft Community Contributor Award Recipient

Microsoft Windows 7 Home Premium 64-bit Service Pack 1
 
 

Quote   Quote: Originally Posted by JerometheGiraff View Post
Kado - I know, I want to understand why the vanilla method won't work.

Gokay - The target folder does not have the same name as the source folder, but all the sub-folders of the source folder to which I want to link to the target folder must have the same name.

The target folder and the source folder should have the same name otherwise it would be pointless for what I'm trying to achieve unless it doesn't matter if the source and target folder name are different as long as the sub-folders remain the same; but I won't know if this is valid until I ever get the symbolic link to work ?
I think your problem may be that the target folder already exists. I think if you are trying to create the junction C:/test/target then only c:/test can exist.
My System SpecsSystem Spec
Comment

 MKLINK Create and Use Links in Windows




Tutorial Tools Search this Tutorial
Search this Tutorial:

Advanced Search




Similar help and support threads
Windows 7 Tutorial Category
MKLINK, HIBERFIL.SYS amd SSD space
I have two drives, an SSD for the OS (C:) and a platter drive for data (D:). I want to be able to hibernate my PC but don't want HIBERFIL to wear out my SSD as I have lots of memory (24GB) being written to the SSD every time I hibernate. Can anyone please advise me whether it's possible to move...
General Discussion
MKLINK - Can not create what is already there
Not correct sentence but it is original in Swedish. Because i am not a fan of printscreen, so i will post what i have written: C:\Windows\system32>mklink /d "C:\Users\Susanne\AppData\Local\Opera Software\Ope ra Stable" "E:\" I am not really shure about the differens between "j" and "d",...
General Discussion
Create Skydrive share links within file explorer
I'm using skydrive often and I really like it. I also Like the Feature that I can send a link to my friends so that they can download the file. Unfortunately I always need to login on the Web Interface to create the link - with a lot of clicks. Is there a way to create this link directly from...
Software
Links Library - Create
How to Create a "Links" Library with Correct Icon in Windows 7 and Windows 8 This will show you how to create a Links library that has the correct Links folder icon on a glass plate for it's library icon in Windows 7 and Windows 8. The included folder C:\Users\(user-name)\Links is also the...
Tutorials
How to create my own folder links in the Start Menu
On the right hand side you have buttons (User, Pictures, Music, Video,etc) that I don't want/use. Would like to change some of these for my needs. Played around with it a bit but without luck. How do I do this?
Customization


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 02:38.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App