Lapas

otrdiena, 2014. gada 1. jūlijs

Create symbolic link from remote to local folder

To create  symbolic link to remote folder:

C:\Windows\system32>mklink /d "D:\DATA\IT\ISO" "\\SERVER_NAME\ISO"

To check does link already exists

if exist "D:\DATA\IT\ISO" (
goto next
)else (
ECHO Creating Symlcnc...
mklink /d "D:\DATA\IT\ISO" "\\SERVER_NAME\ISO"
)
:NEXT
PAUSE


When access a symbolic link on a file server, sometimes you may see the following error:
"The symbolic link cannot be followed because its type is disabled". This is because by default remote to remote symbolic links are disabled.

You can enable it with fsutil.

C:\Windows\system32>fsutil behavior query SymlinkEvaluation - check status
C:\Windows\system32>fsutil behavior set SymlinkEvaluation R2R:1 - enable from Remote to remote