Create a symbolic link in Folder B that points to Folder A using the Windows
mklink command. This technique makes the contents of Folder A appear directly inside Folder B without duplicating data, allowing you to access files from multiple locations seamlessly while saving disk space and maintaining a single source of truth for your documents.
Understanding Symbolic Links
A symbolic link, often called a symlink or junction, is a special type of file that acts as a pointer to another file or directory. When you create a symbolic link from Folder B to Folder A, Windows treats the link almost exactly like a real folder. Any application that opens Folder B will see the contents of Folder A transparently. This is different from copying files because the data remains in one physical location on your drive. If you edit a file through the link, the original file is updated. If you delete the original file, the link becomes broken. This method is highly efficient for organizing projects where you need quick access to shared resources without cluttering your primary directory structure.
Prerequisites for Creating Links
Before executing any commands, you must ensure you have the necessary permissions. Creating symbolic links requires administrative privileges on Windows systems. You also need to know the exact paths of both folders. Let us assume Folder A is located at
C:\Source\FolderA and you want to expose it inside
D:\Target\FolderB. It is crucial that Folder B exists before you attempt to create the link. The link itself will be created as a subdirectory within Folder B. Additionally, be aware that some older applications may not handle symbolic links correctly, though modern Windows 10 and 11 versions support them natively. For more complex scenarios involving automatic synchronization, you might consider exploring
How to Automatically Make Contents of Folder A Appear Inside Folder B, which covers background syncing options.
Creating the Symbolic Link via Command Prompt
The most reliable way to create these links is through the Command Prompt. Start by pressing the Windows key, typing "cmd", right-clicking the Command Prompt result, and selecting "Run as administrator". This step is mandatory; standard user accounts are blocked from creating symlinks by default for security reasons. Once the elevated window is open, you will use the
mklink utility. The syntax generally follows this pattern:
mklink /D Link Directory. Here,
/D specifies that you are creating a directory symbolic link rather than a file link.
Navigate to the destination folder, Folder B, using the
cd command. For example:
cd D:\Target\FolderB. Then, execute the mklink command with the desired name for the link and the full path to the source. If you want the link to simply show up as a folder named
LinkedFolder inside Folder B, run:
mklink /D LinkedFolder C:\Source\FolderA. Upon successful execution, you will see a message confirming the symbolic link was created. You can now open File Explorer and navigate to Folder B to see the new link. Double-clicking it will reveal the contents of Folder A.
Verifying and Managing the Link
After creation, verify that the link works by opening it in File Explorer. Check if you can read and write files. Note that when you view the properties of the link, it shows the target path. If you move the original Folder A, the link will break. To fix this, you must delete the link and recreate it with the new path. Deleting a symbolic link does not affect the original data. Simply select the link icon (which usually has a small arrow overlay) and press Delete. If you encounter issues where files do not open properly, check if naming conventions are causing conflicts, as detailed in
Files do not open when they begin with . on Windows.
For troubleshooting, you can list all symbolic links in a directory by running
dir /al in the Command Prompt. This lists only directory junctions and symlinks. If you need to switch drives frequently during setup, remember that Command Prompt and PowerShell handle drive switching differently, so keep that in mind if you face navigation errors, as discussed in
Command Prompt Drive Switching Different From PowerShell.
Alternative Methods and Considerations
While
mklink is the standard tool, third-party software can also manage these relationships. However, native tools are preferred for stability and security. Be cautious when moving folders that contain active symbolic links, as relative paths may break if the directory structure changes depth. Also, cloud storage services like OneDrive sometimes struggle with deep nested symbolic links, potentially causing sync errors. Always back up critical data before experimenting with filesystem modifications.
Frequently Asked Questions
Can I create a symbolic link between different drives?
Yes, you can create a symbolic link that points from one drive letter to another, such as from
D: to
E:. The
mklink command handles cross-volume links seamlessly in modern Windows versions. Just ensure both drives are accessible and mounted when the system boots.
What happens if I delete the original folder?
If you delete the original source folder, the symbolic link becomes a "broken" or "dangling" link. It will still appear in the destination folder, but attempting to open it will result in an error stating the path is not found. The link itself takes up negligible space until it is manually deleted.
Do symbolic links work with network shares?
Yes, you can point a local symbolic link to a network share path (UNC path). This allows you to access remote files as if they were local. However, performance depends entirely on your network speed and latency. Offline files features may also interfere with how the OS caches these remote directories.
Is there a limit to the number of symbolic links I can create?
Windows does not impose a strict numerical limit on the number of symbolic links per user, but practical limits exist based on available disk space and file system metadata overhead. Extremely deep nesting of links can cause performance issues or exceed the maximum path length allowed by the API, leading to failures.
How do I remove a symbolic link?
To remove a symbolic link, you do not need special tools. Simply delete it like any regular folder using File Explorer or the
rmdir command in the Command Prompt. Remember that deleting the link never deletes the target data. Use
rmdir LinkName if the graphical interface fails to recognize it as a removable item.