Wednesday, October 16, 2024

Today's Obscure Windows Question

 My laptop came with a 1TB SSD.  Within a year or two, that was not enough.  (I have more PDFs of antique American statute books than you can imagine.)  I did not want to risk fauilure to copy over from my old drive C to my new drive, so I made my new drive D and told the BIOS to boot from the new drive.  

Now, I have drive C with 160GB free, and drive D with all my files and programs installed on it.  I would like to be able to clear drive C and map various directories (Pictures, Documents, Videos, Downloads) to drive C.  Perhaps map all the non-programs to drive C.

In Linux, assuming that my memory of how symbolic links work is correct, you would create a symbolic link so that D:\Users\clayt\Documents actually points to C:\Documents so all references will actually turn into C:\Documents.  

It appeears that a directory junction ("mklink /J link destinationfolder") does what is required.

I created a junction link 

mklink /j "D:\users\clayt\testlink" C:\testlink

Then I copied files into D:\Users\clayt\testlink.  They appeared in C:\testlink.  If I deleted a file in D:\Users\clayt\testlink, it disappeared in C:\testlink.

No comments:

Post a Comment