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

09 Jul 2015   #70
GokAy

Windows 7 Ultimate x64 SP1
 
 

Same, nevertheless


My System SpecsSystem Spec
.
09 Jul 2015   #71
JerometheGiraff

Windows 10 Pro
 
 

Quote:
C:\Windows>mklink C:\Users\....\....\....\....\.....\...\<individual file> C:\1
The syntax of the command is incorrect.
I tried mklink with both the link and target options, no success ?
My System SpecsSystem Spec
09 Jul 2015   #72
kado897

Microsoft Community Contributor Award Recipient

Microsoft Windows 7 Home Premium 64-bit Service Pack 1
 
 

Are you running in an elevated cmd?
My System SpecsSystem Spec
10 Jul 2015   #73
GokAy

Windows 7 Ultimate x64 SP1
 
 

I guess either what Kado has said or path has space in it.

Can you copy paste exact command here?
My System SpecsSystem Spec
.

10 Jul 2015   #74
Pyprohly

Windows 10, Windows 8.1 Pro, Windows 7 Professional, OS X El Capitan
 
 

Quote   Quote: Originally Posted by JerometheGiraff View Post
C:\Windows>mklink C:\Users\....\....\....\....\.....\...\<individual file> C:\1
The syntax of the command is incorrect.
If this is the exact command you are entering, there's no doubt you'll get a syntax error.

Quote   Quote: Originally Posted by kado897 View Post
Are you running in an elevated cmd?
It would say "You do not have sufficient privilege to perform this operation" if he hadn't.


Here, Jerome, why not tell us where you want your symbolic link placed, also the target it should point to. Then we'll create the command line for you.
My System SpecsSystem Spec
10 Jul 2015   #75
Kari

Microsoft Community Contributor Award Recipient

 

Quote   Quote: Originally Posted by JerometheGiraff View Post
Quote:
C:\Windows>mklink C:\Users\....\....\....\....\.....\...\<individual file> C:\1
The syntax of the command is incorrect.
I tried mklink with both the link and target options, no success ?


A file link is a hard link. This from the tutorial:
Quote:
A Link can be so called Hard Link linking one file to a target file, or a Soft Link linking a folder to a target folder. Soft Links are also called Symbolic Links. Third link type is Junction, basically a hard link but as hard links can only link files we need to use junctions to link folders.
Your mklink command has no switches, meaning that Windows thinks it is a symbolic link (a folder). To create a hard link you have to use the /H switch. Another error in your command, and this is quite a fundamental error, is that you have mixed the link and the target, switching their places.

Here's an example of using the mklink to create a file (hard) link:
  • I have an ISO file W10TP_BUILD_10166_X64_EN-US.iso stored in E:\Users\Public\Downloads folder
  • I want to refer to this ISO file with a shorter link E:\Test.iso
  • The mklink command I have to give, with the /H switch to tell the system I will create a hard link, and link & target in correct places:
    Code:
    mklink /H E:\Test.iso E:\Users\Public\Downloads\W10TP_BUILD_10166_X64_EN-US.iso
  • The file (hard) link will now be created

That's it.
-2015-07-10_11h08_17.png
Kari


My System SpecsSystem Spec
10 Jul 2015   #76
kado897

Microsoft Community Contributor Award Recipient

Microsoft Windows 7 Home Premium 64-bit Service Pack 1
 
 

It's far easier to use a GUI. This is the one I use. https://github.com/amd989/Symlinker
My System SpecsSystem Spec
10 Jul 2015   #77
Kari

Microsoft Community Contributor Award Recipient

 

It's what you are used to use. I bet I can open the command prompt and type my command in the time I would need to start a third party tool and do the same.

Screenshot in my previous post, I didn't need a full minute to open the command prompt, give the command and make a screenshot.
My System SpecsSystem Spec
10 Jul 2015   #78
kado897

Microsoft Community Contributor Award Recipient

Microsoft Windows 7 Home Premium 64-bit Service Pack 1
 
 

You are right of course Kari. It is what you are used to.
My System SpecsSystem Spec
10 Jul 2015   #79
Pyprohly

Windows 10, Windows 8.1 Pro, Windows 7 Professional, OS X El Capitan
 
 

Quote   Quote: Originally Posted by Kari View Post
Your mklink command has no switches, meaning that Windows thinks it is a symbolic link (a folder).
Slight mistake there, Kari.
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 23:04.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App