Similar to Linux, windows has symbolic file and hardlink file as well. Keep in mind that symbolic file is not shortcut.
how to create a symbolic file:
mklink /options link originalFile_path
options:
- J: folder symbolic link.
- H: create a hard link
- D: create a shortcut
eg. You have a folder called files in volume D: , you want to create a symbolic file which is called file pointing to this folder. Use this command
C:> mklink /J file D:\files
Junction created for file <<===>> D:\files
I have not tried other options, but it seems if you don’t use /J
(Junction) option you will have to do a registry hack.
You can verify the link with dir
command.
Usage:
This can be useful for Program that does not provide configuration option to move some big file from C: (system drive) to another drive. E.g. Itunes mobile backup ( typically in C:\Users\user_name\AppData\Roaming\Apple Computer\MobileSync\Backup ).
So, you can move this folder to another drive, e.g. D:\Backup, and then make a symbolic file.
mklink /J C:\Users\user_name\AppData\Roaming\Apple Computer\MobileSync\Backup D:\Backup
Show the existing links in a drive
dir /AL /S C:\
/A
displays all files with a specific attribute, andL
specifies reparse points (symlinks and directory junctions)/S
makes the command recursive- replace
C:\
with the drive letter you want to scan, or with a path if you don’t want to scan an entire drive
Reference:
https://msdn.microsoft.com/en-us/library/windows/desktop/aa365682(v=vs.85).aspx