How to create symbolic links in Windows
Do you want to easily access files and folders from other folders without having to maintain a copy of the files and folders to open? This tutorial will show you how to create hard and soft symbolic links pointing to a file or folder in Windows 7, Windows 8 and Windows 10.
How to create soft links and hard links in Windows
- What is symbolic link?
- Why use symbolic links?
- 1. Create symbolic links using Windows' built-in tools
- Use Command Prompt
- Use PowerShell
- 2. Use the Link Shell Extension application to create a symbolic link
- 3. Delete symbolic link
What is symbolic link?
Symbolic link, still known as symlinks, is basically an advanced shortcut. Users can create symbolic links for individual files or folders, then these links will appear as if they are stored in the same folder as the symbolic link even though the symbolic link points back. to their actual location.
There are two types of symbolic links: soft links and hard links. The soft symbolic link works basically like a standard shortcut. When opening a soft link, you will be redirected to a folder where the files are stored. However, a hard link makes it appear as if the file or folder exists in place of the symbolic link, your applications will not know the difference.
Why use symbolic links?
There are many things that we can use symbolic links for, here are some things like this:
- Sync folders with Dropbox.
- Move the installation directory to any program from its original location.
- Save your Music / Pictures / Videos on the second hard drive, but make it visible in the standard Music / Pictures / Videos folder so that they will be detected by your media programs.
- Keep access to important files from multiple locations.
Note : Never create symbolic links within a symbolic link. For example, do not create a symbolic link to a file inside a symbolic linked folder. This can create a loop, and this loop will probably cause millions of problems that you don't want to meet.
1. Create symbolic links using Windows' built-in tools
Use Command Prompt
Step 1 . Open Command Prompt as an administrator.
Note: If you have Developer Mode in Windows 10 enabled, you need to use mklink command in Command Prompt instead of advanced Command Prompt.
Step 2 . Type the following command into Command Prompt and press Enter .
Create soft links :
- mklink "Link" "Target" (Link to a file)
- mklink / d "Link" "Target" (Link to a directory)
Create hard links:
- mklink / h "Link" "Target" (Link to a file)
- mklink / j "Link" "Target" (Link to a directory)
Replace Link in the above command with the full path with the file name (directory) and the file extension you want to create symbolic link.
Replace Target in the above command with the full path to the file or folder along with the file extension you want to symbolically link to.
Step 3 . When done, you can close Command Prompt if you want.
Use PowerShell
Step 1 . Open PowerShell as admin.
Step 2 . Type the following command into PowerShell and press Enter
Create soft links:
- New-Item -ItemType SymbolicLink -Path "Link" -Target "Target" (Link to a file and folder)
Create hard links:
- New-Item -ItemType HardLink -Path "Link" -Target "Target" (Link to a file)
- New-Item -ItemType Junction -Path "Link" -Target "Target" (Link to a directory)
Replace Link in the above command with the full path with the file name (directory) and the file extension you want to create symbolic link.
Replace Target in the above command with the full path to the file or folder along with the file extension you want to symbolically link to.
Step 3 . After completing PowerShell close.
2. Use the Link Shell Extension application to create a symbolic link
The Link Shell Extension is free software, allowing you to create a symbolic link using the File Explorer context menu. When installed, it also makes Explorer create different icons for hard links, soft links to easily link to files and folders.
To use Link Shell Extension, you need to download it first by following link:
http://schinagl.priv.at/nt/hardlinkshellext/linkshellextension.html
Here you will find the Visual C ++ application and runtime installation program required. Install runtime before and then install the application.
Create a link to a folder, file
To create a new symbolic link or directory junction for a specific directory, you need to do the following:
Step 1. Click on the folder, the file you want to link and select Pick Link Source .
Step 2 . Now right-click on an empty area in the new destination folder. You will see a small drop- down menu with several options such as directory junction and symbolic link.
Step 3 . Confirm the UAC message appears.
You will get the link as shown below:
3. Delete symbolic link
Deleting symbolic links is a very simple task - just delete the link! Most command line utilities provide you with a way to delete symbolic links via Command Prompt, but you don't need to be so complicated.
Step 1 . Open File Explorer (Windows 8/10) and Windows Explorer (Windows 7)
Step 2 . Navigate to the symbolic link location (hard and soft) and delete it. This does not delete the symbolic link file / directory pointing to, just delete the link.
Symbolic links are indeed very useful, if using them continuously it will help us get organized and avoid the phenomenon of having to remember all the places that we need to find.
I wish you all success!
You should read it
- Check and detect broken links on any website
- How to manage symlinks in Linux
- Warning: The YouTube URL shared on Facebook may be deceptive
- How to customize the link share on Facebook
- Instructions for shortening links when sharing - 5 websites that help shorten the best links
- How to insert links, links, Hyperlinks in Gmail
- Hazards from shortened links and prevention
- How to delete, replace or edit links in PDF documents with PDF Link Editor
- The organization quickly links to IE7
- Websites that get / Get High Speed VIP Link
- Sopcast Link, Ace stream watching live football
- How to shorten links quickly - Top 5 free link shortening websites are used the most today
Maybe you are interested
How to share text on Chrome as a link
Download link for Adobe After Effects 32bit, 64bit FULL standard free
Instructions for viewing link summary content on Chrome
How to delete links in Excel, delete hyperlinks in Excel
How to turn off Update Link notification in Excel - File content from many different sources
Close-up of a mantis shrimp's punch stronger than a bullet, killing a mud crab in the blink of an eye