Linking Two Folders

TheNickNack

Reputable
Mar 24, 2014
46
0
4,530
Hi,

I have a program that reads data from a folder from the install directory. The problem is I have ran out of space on the hard drive containing the data and the program.

If I create another folder with the same name in a different internal/external drive, can I get the program to read data from both the folders by linking them in any way?

I want the program to read the data simultaneously from both the folders, not only one at a time.
 

Tanyac

Reputable
Move your folder to a drive with enough space. Then create a symbolic link.
Example, folder called "MyFiles". Starting drive C:, new drive E:

1. move the folder C:\MyFiles to E:\MyFIles
2. From a command prompt type
mklink /d MyFiles E:\Myfiles.

Note: If the folder names have spaces, be sure to enclose both folder names on the mklink command in double quotes.

If the new drive is a remote drive (eg a shared/mapped drive on another computer), the symbolic link will not work until you enable another option call symlinkevaluation.

In this case, the mklink command is the same, but you also need to run (from a command prompt)...

fsutil behavior set symlinkevaluation l2l:1 l2r:1 r2r:1 r2l:1

(l=local, r=remote. This enables all possible combinations of symlinkevaluation).

Caveat: If the folder contains an installed program there may well be configuration settings in the registry (eg installed folder paths, uninstaller paths etc).. This will generally still work with the symbolic link. Check for issues after setting it up.

Note: This does not work with Steam. They broke symbolic links in an update in early 2017