Halloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PCHalloween DealsAmazon USOctober picks are moving - compare before checkoutAmazon US: current deals, useful picks and tech finds.See Picks×
FREEDOM251

Freedom251 › Blog › file management

How to Create a Symbolic Link in Windows to Use One File or Folder from Two Places

By Freedom251 Team · · 10 min read

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Use Windows’ built-in mklink command to make one file or folder available through a second path without creating a duplicate. For a folder, open Command Prompt and run mklink /D "C:pathtolink" "C:pathtooriginal-folder". The first path is the new link; the second is the existing folder that stores the real data.

What a symbolic link does

A symbolic link is a filesystem object that points to another file or folder. Windows applications can open the link path, while the operating system redirects the request to the target path. This gives you two routes to the same data, but it does not create a second independent copy.

As an Amazon Associate I earn from qualifying purchases.

If you change a file through either path, you are changing the same underlying file. Deleting the target file affects access through both paths. The link itself contains path information; it is not a second storage location and does not provide a backup.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

This is useful when a program expects files in a particular directory but you want the actual data stored elsewhere, or when two directory structures need to expose the same folder. Exact behavior can vary between applications, especially backup, synchronization, security and indexing software, so verify the result with the program you intend to use.

Choose the correct link command

Command or option Creates Use it for Important distinction
mklink /D <link> <target> Directory symbolic link Making one folder appear at another path The relevant choice for a folder-to-folder symbolic link
mklink <link> <target> File symbolic link Making one file available through a second filename Omitting an option creates a file symbolic link
mklink /J <link> <target> Directory junction A different Windows directory-link type It is not automatically interchangeable with a symbolic link; compatibility and path behavior differ
mklink /H <link> <target> Hard link A separate hard-link use case Do not use it as the default for linking a folder; the documented option is distinct from a symbolic link

Microsoft documents the general syntax as mklink [[/d] | [/h] | [/j]] <link> <target>. The argument order matters: the link path comes first and the existing target comes second.

Prepare the two paths before creating the link

Identify the target

The target is the existing file or folder that contains the real data. For example, suppose the actual folder is C:UsersAlexDocumentsProjectFiles. That is the second argument in the command.

Choose an unused link path

The link path is where the second route will appear. It must not already be an existing directory or file. For example, C:SharedProjectFiles can be the new path if the ProjectFiles entry does not already exist there.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Do not create the link inside the target itself unless you have a specific reason and understand the resulting path loop. A link that points back into its own directory tree can confuse applications and recursive tools.

Check the volume and naming requirements

Both paths can contain spaces; surround each complete path with double quotation marks. A symbolic-link target may be absolute or relative. Relative links are resolved from the link’s location and are restricted to a single volume. An absolute path is usually easier to understand, but it can stop working if the target is moved or its drive letter changes.

Create a directory symbolic link with Command Prompt

  1. Confirm the target folder exists and decide on a link path that is not already in use.
  2. Open Command Prompt from the Start menu. If Windows reports that you do not have sufficient privilege, close it and select Run as administrator when opening it.
  3. Run the command with the link first and target second:
    mklink /D "C:SharedProjectFiles" "C:UsersAlexDocumentsProjectFiles"
  4. Read the result. A successful command reports that a symbolic link was created and shows the two paths.
  5. Open C:SharedProjectFiles in File Explorer. Create a small test file there, then check the original folder to confirm that both paths expose the same contents.

Replace the example paths with your own. Do not swap their order: putting the existing target first asks Windows to create the link at the wrong location and commonly produces an error.

Create a file symbolic link

For one file rather than an entire directory, omit /D. The link filename must be unused, while the target file must already exist:

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
mklink "C:Sharedsettings.json" "C:UsersAlexAppDataRoamingExampleAppsettings.json"

Applications that open C:Sharedsettings.json are redirected to the original file. Editing, replacing or deleting the target changes what is available through the link as well.

Use a file link when the requirement is one particular file. If several files must appear under a second directory, create a directory symbolic link instead of making a separate link for every file.

Create the link from PowerShell

PowerShell provides the same operation through New-Item:

New-Item -ItemType SymbolicLink -Path "C:SharedProjectFiles" -Target "C:UsersAlexDocumentsProjectFiles"

For a file, use the file’s link path and target in the same parameters:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
New-Item -ItemType SymbolicLink -Path "C:Sharedsettings.json" -Target "C:UsersAlexAppDataRoamingExampleAppsettings.json"

Microsoft’s PowerShell documentation states that symbolic-link creation normally requires elevation. On Windows 10 build 14972 or newer, enabling Developer Mode can allow symbolic-link creation without elevation. The exact requirement can also depend on the program or API being used and on the machine’s policy configuration. If PowerShell returns an access or privilege error, reopen it with Run as administrator or enable Developer Mode where appropriate.

Verify that the link points where you expect

Use File Explorer

Open the new path and compare its contents with the target. A directory link should expose the target’s files and subfolders. Open one file through the link and make a harmless change, then confirm the same change appears when you open the target directly. Remove the test change afterward if it was only for verification.

Check from the command line

In Command Prompt, run dir on the parent directory. Windows displays a symbolic-link entry with the destination in the listing. This helps distinguish a link from a normal folder that happens to have similar contents.

Test the application that needs the second path

Open the relevant application and use its normal Open or Import dialog to select the link path. A link that works in File Explorer may still be handled differently by a particular backup, synchronization, security or other utility. Treat application compatibility as something to verify rather than assuming every program follows links in the same way.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Understand absolute and relative symbolic-link targets

Absolute targets

An absolute target includes the complete drive and directory, such as C:UsersAlexDocumentsProjectFiles. It is straightforward to inspect and does not depend on where the link is located. Its weakness is that moving the target, changing a drive letter or restoring the data to a different path can leave the link unresolved.

Relative targets

A relative target describes the destination in relation to the link’s own location. Microsoft documents relative symbolic links as being resolved from the link position and restricted to a single volume. They can be useful when the link and target are moved together while preserving their relative layout.

Moving only one of the two objects can break a relative link. Moving both can still break it if their relationship changes. Choose the form that matches how the folders will be reorganized, and test the link after any move or restore operation.

Remote and UNC paths

Windows path documentation describes symbolic-link support for UNC paths, which are network paths such as \serversharefolder. Network availability, credentials and the behavior of the consuming application still determine whether a remote link is usable in practice. Do not treat a link to a network location as an offline copy.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Permissions, elevation and security

Creating a symbolic link is a privileged operation on many Windows installations. If mklink or New-Item reports an access-denied or privilege error, run the shell with administrative elevation. On supported Windows 10 builds, Developer Mode can remove the need for elevation for this operation. Windows policy can impose additional restrictions.

Microsoft’s user-rights documentation says the symbolic-link creation privilege should be assigned only to trusted users. That warning concerns granting the privilege through policy; it does not mean ordinary users should modify security settings casually. Use the least privilege that allows the task, and avoid running unrelated commands in an elevated window.

A symbolic link can redirect a program to a location the program did not expect. Review who can modify the target and the parent directories. If an untrusted user can replace the target or alter the link’s surrounding path, an application may read or write unexpected data.

Remove a symbolic link without deleting the target

To stop exposing the second path, remove the link object itself. Do not recursively delete the linked directory. Removing the target instead destroys the data that both paths use.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Remove a directory symbolic link

In Command Prompt, use rd on the link path:

rd "C:SharedProjectFiles"

This removes the directory-link entry while preserving C:UsersAlexDocumentsProjectFiles. Confirm that you typed the link path, not the target path.

Remove a file symbolic link

Use del on the link filename:

del "C:Sharedsettings.json"

The target file remains at its original location. If you are uncertain whether an entry is a link, inspect it first with a directory listing and verify the destination.

Troubleshoot common errors

“The file already exists” or the link cannot be created

The proposed link path is occupied by a file, folder or existing link. Choose a new name, or remove the old link after confirming that it is not the target. A directory symbolic link cannot replace an existing directory in place.

“You do not have sufficient privilege”

Reopen Command Prompt or PowerShell with Run as administrator. If you are on a supported Windows 10 build, Developer Mode may permit unprivileged creation. On managed computers, a policy may prevent changing the relevant privilege; contact the administrator instead of attempting to bypass that policy.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The link opens an empty or missing location

Check the target path character by character, including the drive letter, spelling and quotation marks. If the target was moved, renamed or disconnected, recreate the link with its current location. For a relative link, confirm that the link and target remain on the same volume and still have the intended relative layout.

The application ignores or rejects the link

Some software deliberately does not follow symbolic links or treats them as a security boundary. Check that application’s own documentation and settings. If it requires a physical copy, a symbolic link cannot provide that behavior; copying or using the application’s supported storage-location feature is a separate solution.

A backup or synchronization job behaves unexpectedly

Link traversal policies differ. A tool may back up the target once, traverse it through each linked path, skip links, or report a warning. Review the tool’s documentation and inspect a test backup before relying on a linked directory for recovery.

The link works locally but not over a network

Check that the target computer or share is reachable and that the account has permission to access it. UNC targets depend on network authentication and availability. A local link does not make an unavailable network target available.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Examples you can adapt

Expose a document archive in two locations

Keep the archive at D:Archive2026 while making it visible under C:UsersAlexDocumentsArchive2026:

mklink /D "C:UsersAlexDocumentsArchive2026" "D:Archive2026"

The files remain on drive D:. The path under Documents is only another route to them.

Place application data on another drive

If an application expects C:ProgramDataExampleAppData but the data should live at E:ExampleAppData, first ensure the expected directory is not present, then create:

mklink /D "C:ProgramDataExampleAppData" "E:ExampleAppData"

Whether the application accepts this arrangement depends on how it checks paths and permissions. Test it before moving important production data.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Make one configuration file available under a second name

To expose C:Configproduction.json at another path:

mklink "C:UsersAlexDesktopproduction.json" "C:Configproduction.json"

Both names refer to the same file. Renaming or replacing the target can affect the link, so keep the target path stable if another program depends on it.

Symbolic link, junction, hard link or shortcut?

Characteristic Symbolic link Junction Hard link Shortcut
Filesystem link or shell object Filesystem link Separate filesystem directory-link type Filesystem link to a file Shell shortcut, not the same filesystem-link mechanism
Typical target Files or directories Directories Files A user-selected file, folder or location
Command mklink, with /D for a directory mklink /J mklink /H Created through the graphical shortcut workflow
Path behavior Supports absolute or relative targets; relative links have single-volume and placement constraints Not fully interchangeable with a symbolic link; verify the requirements of the software using it Has different filesystem semantics from a symbolic link Applications may treat it as a shortcut rather than transparently opening the target
Best fit for this task Use for a second path to one file or folder Consider only when a junction is specifically required Not the default for folder-to-folder access Use for a human-facing desktop or Start-menu convenience, not transparent filesystem redirection

For the stated goal of using one folder from two paths, a directory symbolic link created with mklink /D is the direct choice. For one file, use plain mklink. The other types solve different problems and should not be substituted solely because their names sound similar.

Safe-use checklist

  • Keep the real data in the target and record its full path.
  • Use an unused link path; do not overwrite an existing directory.
  • Put the link argument first and the target argument second.
  • Use /D for a directory symbolic link and no option for a file symbolic link.
  • Quote paths containing spaces.
  • Use an elevated shell when Windows requires it, or use Developer Mode on a supported Windows 10 installation.
  • Test the link with File Explorer and with the application that will consume it.
  • Check backup and synchronization behavior before trusting linked data to a recovery process.
  • When removing the link, use rd for a directory link or del for a file link, and never recursively delete the target by mistake.

The Bottom Line

Use mklink /D "link path" "target path" for a folder or mklink "link path" "target path" for a file. The link creates a second route to the same data, so preserve the target and remove only the link when you no longer need it.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

file managementmklinkPowerShellsymbolic linksWindows

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Recommended PC Tool
Recommended PC Tool
Crashes, No Sound, or Screen Glitches?Free driver scan
Windows Errors? Fix Them Before They SpreadFree repair scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.