Like in Linux, we can create symbolic links in Windows OS also. There’s an inbuilt command called ‘mklink‘ using which we can create symbolic links.
The commands are explained below with examples.
Create a symbolic link to a file:
The syntax for creating a symbolic link to a files is as follows.
mklink LinkFile TargetFile
For example, to create a symbolic link from user’s Desktop folder to “C:\Program Files (x86)\Microsoft Office Communicator\communicator.exe”, the command is
mklink C:\users\wincmd\Desktop\communicatorLink.exe C:\Program Files (x86)\Microsoft Office Communicator\communicator.exe"
In the above command communicatorLink.exe is the name of the symbolic link. “C:\Program Files (x86)\Microsoft Office Communicator\communicator.exe” is the target for the link.
Create symbolic link to a directory:
Syntax for creating symbolic link to a folder is as follows.
mklink /D linkfile TargetDirectory
Example:
Create a symbolic link from C:\ folder to user’s Documents folder
mklink C:\Docs C:\Users\wincmd\Documents
Create a hard link
mklink /H link target
Create a junction point
mklink /J junction target
Adding users from command line is much easier than going through the UI. It saves…
Do you want to delete a directory from Windows command prompt(CMD)? This post explains how…
We can kill a process from GUI using Task manager. If you want to do…
Chrome is definitely the stable browser compared to other ones and it has been my…
Windows has multiple command line utilities that can help find the version of the Windows…
There are multiple ways to check whether a Windows computer is running 32-bit OS or…
View Comments
Actually, mklink does not exist on Server 2003.