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
Thread Forum
Files won't delete in directory - can't rename the directory either
So i have 3 files i cannot delete after uninstalling a game. I also cannot rename the folder they are in without windows explorer not responding and i have to restart explorer. I did take ownership method but that froze up to. I went into safe mode, and tried it that way - also didn't delete, it...
General Discussion
Unable to delete directory.
I'm hoping somebody can help me here, I recently moved my Dropbox directory and bungled a few things. At the moment everything seems functional except that I cannot delete one of the folders left from before the move. The folder is 0 Bytes. It is Read-Only and I am unable to change that. Under...
Performance & Maintenance
is c/boot directory needed? may delete it?
when i have installed windows 7 ultimate then i didnt had this folder . but this time i am getting this boot folder,,,,is it required folder or not? why this is seen this time and not previous installtion of win7? may i delete this ? is there any wrong going if i delete this? please help me pic...
Performance & Maintenance
Symlinker - Create Symlink, Hardlinks, And Directory Junctions via GUI
This simplified GUI could be very helpful to those who prefer it over the command line. symlinker: Create Symlink, Hardlink, And Directory Junction In Windows
Files that I can delete off of Main HD directory
I am terribly sorry if I posted this in the wrong place. I couln't really find a catagory that this could go under. This is the closest. I am cleaning out my HD, I am at the main directory and I know deleting certain files (such as C:\Windows) would screw up the system. There is tons of files in...
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:22.
Twitter Facebook Google+