Selecteer een pagina

Mklink /j Example [Web QUICK]

✅ if paths contain spaces:

dir /a:J ✅ :

<JUNCTION> Projects [D:\Data\Projects] Use Case 1: Moving large folders to another drive (e.g., game saves, app data) Goal : Move C:\Users\YourName\AppData\Local\MyGame to D:\Games\MyGame to save C: drive space. mklink /j example

❌ (A → B → A) – this can confuse backup software and file search. 9. Quick Reference Card | Action | Command | |--------|---------| | Create junction | mklink /J "LinkFolder" "TargetFolder" | | Remove junction | rmdir "LinkFolder" | | List junctions | dir /a:J | | Show target | dir "LinkFolder" (look for [JUNCTION] ) | This guide covers everything you need to safely and effectively use mklink /J in Windows.

dir C:\Users\YourName\Desktop You’ll see: ✅ if paths contain spaces: dir /a:J ✅

❌ (USB, SD card) – if the drive is missing, any access to the junction will fail.

rmdir C:\Users\YourName\Desktop\Projects This removes only the junction, not the target folder or its contents. del /a:J <LinkPath> But rmdir is simpler and safer. 8. Tips & Best Practices ✅ Always use absolute paths for both <Link> and <Target> to avoid confusion. Quick Reference Card | Action | Command |

mklink /J "C:\My Links\Documents" "D:\User Data\Documents" ✅ in a directory: