mklink [[/D] | [/H] | [/J]] <Link> <Target> | Flag | Type | Description | |------|------|-------------| | /D | Symbolic Link (Dir) | Creates a directory symlink. | | (none) | Symbolic Link (File) | Creates a file symlink (default). | | /H | Hard Link | File only, same volume. | | /J | Junction | Directory link (older, works across volumes, but less flexible than symlinks). |
Now go ahead and clean up those duplicate files! 🧩 symbolic link windows
If you’ve ever wished a file could exist in two places at once without duplicating storage space, or needed a folder to appear somewhere else without copying gigabytes of data, you need symbolic links . mklink [[/D] | [/H] | [/J]] <Link> <Target>
To verify:
# File symlink New-Item -Path "C:\link.txt" -ItemType SymbolicLink -Target "D:\real.txt" New-Item -Path "C:\LinkedFolder" -ItemType SymbolicLink -Target "E:\ActualFolder" | | /J | Junction | Directory link
Otherwise, you . Method 1: Using mklink (Command Prompt) mklink is the native Windows command-line tool.