Wednesday, May 2, 2012

Symbolic Link Gotcha in Windows 7

I needed to make a (soft) symbolic link from my local machine to a remote drive. Turns out you need to make the link and then grant the directional permisions for traversal.  This was done using a DOS prompt with nothing fancy added to the path on Windows7. The first command creates a link that will allow the documents added to C: to show up in F: the second allows local to local, remote to local, and local to remote copy. Replacing the 1 with 0 would turn one of these to inactive. The rest is just a test of the bidirectional behavior

>mklink /D F:\Documents C:\Documents
>fsutil behavior set SymlinkEvaluation l2l:1 r2l:1 l2r:1
>copy nul F:\Documents\POOKIE.TXT
>dir C:\Documents\POOKIE.TXT|findstr -i file
>dir F:\Documents\POOKIE.TXT|findstr -i file
>del C:\Documents\POOKIE.TXT
> dir F:\Documents\POOKIE.TXT|findstr -i file

No comments:

Post a Comment