Windows 7 Forums

Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.

Windows 7: How to properly delete Symlinks (Directory Junctions)

21 Apr 2012   #1

Win 7 - Mac OS X - Linux
How to properly delete Symlinks (Directory Junctions)

I am an avid Simracer and I use games like rFactor, GTR2 and the like.

One of the main features these games (or simulators, if my co-gamers catch me calling them "games" there will be hell to pay) is the ability to have "mods" installed to extend their functionality. In this case they are mostly Racetracks and Cars. Some can be quite large.

Installing many car mods in the same installation of rFactor or GTR2 can quickly degrade performance and make troubleshooting very hard, leading to having to wipe out the entire installation and starting from scratch. Also, different racing leagues use different car "Mods" and sometimes they are not compatible with each other.

The result is that many of us have to have multiple installations of the same game in a directory outside "program Files". Each installation carries a mod or a group of mods. The rest of the game is by and large identical, especially the "locations" and "user Data" folders. The "locations" folder is where all the tracks go and that is a very easy folder to share among all the different installations, possibly saving many GB of space on the hard drive and making maintenance easier.

I can edit the .INI file for each game to point them all to the same track directory, but a far better option is to create a Directory Junction Symlink. Beside saving lots of space another advantage is that it keeps the player files synchronized across installations reducing setup times and so on.

I set up 5 different installations of rFactor using Directory junction Symlinks for the "locations" and "User data" folders but in one case I made a mistake and I placed the Symlink in the wrong directory. Easy to do when doing such repetitive work.

I did a quick google search to find out how to remove a Symlink and several posts, including one on this forum, simply said to delete it like one would with any file or folder.

So I did and I wiped out my carefully crafted player file from every installation on my drive. Fortunately I had a backup but I realized that by deleting the "User data" folder that was placed in the wrong location I also deleted the contents of the master folder and all its symlinks.

Clearly, "just delete it" is not applicable to my use of symlinks.

I realize that one way I could approiach it would be to copy the files off the folder, delete the misplaced folder and then move the files back in. However, in a folder like the "locations" folder that means moving several GB worth of files.

So (I apologize for the long prequel) my question is:

How to I sever a Directory Junction Symlink?
How do I delete a Directory Junction Symlink so that it doesn't wipe out my original files?

Incidentally, the files that get wiped out with this method are not saved in the trash. They are just gone for good.

Thank you.

My System SpecsSystem Spec

21 Apr 2012   #2

Windows 7 Pro x86

You need to either:

rmdir the junction from a command prompt

- OR -

have Link Shell Extension installed which, besides all the other stuff it does, fixes explorer's handling of junctions.
My System SpecsSystem Spec
23 Apr 2012   #3

Win 7 - Mac OS X - Linux

Thank you. I'll get the program as I have a mild allergy to the command prompt.
Thank you very much.
My System SpecsSystem Spec


 How to properly delete Symlinks (Directory Junctions)

Thread Tools

Similar help and support threads for2: How to properly delete Symlinks (Directory Junctions)
Thread Forum
Unable to delete directory. Performance & Maintenance
is c/boot directory needed? may delete it? Performance & Maintenance
Symlinker - Create Symlink, Hardlinks, And Directory Junctions via GUI Software
Solved Win 7 Pro: Need script to delete oldest file in directory General Discussion
Can't delete directory on external hard drive General Discussion
Files that I can delete off of Main HD directory Performance & Maintenance

Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 10:03 PM.
Twitter Facebook Google+

Windows 7 Forums

Seven Forums Android App Seven Forums IOS App

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33