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
- 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
May be interested
- How to create links in PowerPointcreating a hyperlink link on powerpoint has many other types such as links between slides, links to websites, ...
- How to create links for content in Google Docsyou can completely create links for any specific content in docs, such as creating links for bookmarks in google docs, creating links for headers in google docs,....
- Create Hyperlink in Wordin the process of working with word, surely not less or less you will also need to insert website links, e-mail or links to files in your computer to make the text full and complete.
- Create links (Link) in MS Wordms word: today's lesson quantrimang.com will guide you how to mark text lines (bookmark) and instructions for creating links to an existing file, web page, email or link in the same file, ...
- How to create USB Windows 10 Technical Preview installationimmediately after microsoft introduced windows 10, the company also provided links to download the first beta for users to experience. so far, it is unknown when microsoft will provide the official version of windows 10. so if you want to download, install and experience hot features on this operating system, you can follow the steps below.
- Path in CSSwith css, the path can be styled very differently.
- How to Insert a Hyperlink in Microsoft Wordyou can insert links in your word document to pictures, music files, video files folders and even web pages. your links can be pictures, text or any other object in your document. you can also create links to a blank email message or to...
- How to create Hyperlink to link in Excelhow to create hyperlink to link in excel. you can create links from excel files to another excel file, a sheet is right there in the excel file, you can even create links to a website on the internet, or to an email address.
- How to customize the link share on Facebooknormally when sharing articles on facebook, titles, descriptions or images are defaulted to the correct post. however, if you want to change those fixed parts, it is very simple.
- Hazards from shortened links and preventionthe purpose of the shortened link is to make it easier to use the internet, but you know its dangers and how to fix it.