- mklink /j example
- mklink /j example
âś… if paths contain spaces:
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.
<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.
dir <LinkPath> Look for the [JUNCTION] line showing the target. mklink /j example
❌ (USB, SD card) – if the drive is missing, any access to the junction will fail.
dir C:\Users\YourName\Desktop You’ll see:
❌ (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. Tips & Best Practices ✅ Always use absolute
