Symbolic Links in Windows
Since Windows Vista we have possibility to create symbolic links on Windows. Yay!
To do that, we have command mklink
in Command Prompt:
C:\Users\jj\Desktop>mklink link_to_some_file.txt c:\Dropbox\some_file.txt
symbolic link created for link_to_some_file.txt <<===>> c:\Dropbox\some_file.txt
Symbolic link is not a shortcut. However, its icon desktop looks the same:
You can find out whether it is a link or shortcut by looking on the properties (left - link, right - shortcut):
You can also check it from the command prompt:
C:\Users\jj\Desktop>dir
Volume in drive C has no label.
Volume Serial Number is A425-1CEF
Directory of C:\Users\jj\Desktop
11/15/2013 10:36 AM <DIR> .
11/15/2013 10:36 AM <DIR> ..
11/15/2013 10:35 AM <SYMLINK> link_to_some_file.txt [Dropboxsome_file.txt]
11/15/2013 10:36 AM 921 some_file - Shortcut.lnk
2 File(s) 921 bytes
2 Dir(s) 15,738,155,008 bytes free
OT: Don't you think dir
command is to verbose? Who needs e.g. Volume Serial Number each time during listing directory?
In PowerShell, you need to use following command: cmd /c mklink
(precede mklink
with cmd /c
).
I use it for my PowerShell config file. Original one is in Dropbox and symlink just point to it from MyDocuments directory (where it has to be, to be applied by PowerShell).