1

I am using multiple installations of the same game (on Windows 10 Home), in order to have easier access to various addon/user configurations. The subfolders of each installation are Directory Junctions, pointing to the subfolders of the original game installation. They are created like this (starting from the parent folder of the folder where the game is installed - in my case, it's C:\Program Files):

rem The original game is installed in the MyCarGame folder
mkdir MyCarGame2
cd MyCarGame2
mklink /J GameData ..\MyCarGame\GameData
mklink /J Maps ..\MyCarGame\Maps

How to properly delete a Directory Junction (in this case "MyCarGame2\GameData" and "MyCarGame2\Maps"), to make sure I'm not removing the files/folders in it too?

Is it ok to delete them from a file manager like Windows Explorer, Total Commander or Free Commander?

This user for example reports that they deleted such a virtual folder and the result was that the content of the source folders was deleted (in my case "MyCarGame\GameData" and "MyCarGame\Maps").

Note: there is a similar question here: How to Delete a Junction by Using Command Line in Windows 7

0

I don't know about Total Commander and Free Commander but you have two ways to delete your junction without deleting the content of the source folder.

From Windows Explorer, go into MyCarGame2 and delete your junctions like any other folder. It doesn't delete the source, just the junction.

From Command Prompt:

cd MyCarGame2
rmdir GameData
rmdir Maps

From PowerShell (thanks to Brian Low's comments[1][2]):

cd MyCarGame2
cmd /c "rmdir GameData" 
cmd /c "rmdir Maps"
  • 1
    Important: which command line? Command Prompt is okay, but for PowerShell this will delete your files, per Brian Low's comments here and here. Instead, and I quote, "Use cmd /c "rmdir mydir" – Mathieu K. Jun 23 at 5:14
  • @MathieuK. I added it in my answer. Thanks. – Pierre Jun 28 at 7:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.