I need to link a file to c:\Windows\System32\drivers\etc\hosts. How can I do that with windows? Is there a soft link such as 'ln -s' or equivalent in Windows?
Tell me more
×
Super User is a question and answer site for
computer enthusiasts and power users. It's 100% free, no registration required.
|
You are looking for the command "mklink". Documentation and examples are here: http://technet.microsoft.com/en-us/library/cc753194%28WS.10%29.aspx |
|||
|
|
There may be other ways, but the one I'm familiar with is mklink:
|
|||
|
|
|
There are junctions but I don't know if this will do exactly what you need. edit - oops sorry, junction only applies to directories not files |
|||
|
|
|
As @inf says, mklink is the solution for Vista and above. For 2000/XP, you can use fsutil hardlink. Note that, unlike mklink, hardlink doesn't work across drives. |
|||
|
|