How to properly delete Symlinks (Directory Junctions)


  1. Posts : 29
    Win 7 - Mac OS X - Linux
       #1

    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?
    or
    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 Computer


  2. Posts : 44
    Windows 7 Pro x86
       #2

    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 Computer


  3. Posts : 29
    Win 7 - Mac OS X - Linux
    Thread Starter
       #3

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


 

  Related Discussions
Our Sites
Site Links
About 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 07:58.
Find Us