Is it possible to create a symlink to a webdav directory on Windows?

6

I know I can map a webdav folder to a drive letter in Windows, but I need to map ~10 different webdav folders (different servers) and assigning a drive letter would be ugly.

Is it somehow possible to create the links as a folder structure, for example by using mklink?

I have tried several combinations (/d, /H, /J flag + https://webdav.server.com/... or \\webdav.server.com@SSL\...) without success. Most of the combinations lead to a virtual folder which when opened loads quite some time (as when the webdav is mapped to a drive), but then fails with similar error messages saying that it is not accessible.

Se Norm

Posted 2012-10-01T16:01:37.160

Reputation: 173

Answers

1

Unfortunately symbolic links in NTFS can only point to locally mounted file systems and network shares via UNC paths: http://msdn.microsoft.com/en-gb/library/windows/desktop/aa363878(v=vs.85).aspx

Apparently this guy has a trick to mount a folder to a WebDAV destination though: https://discussion.dreamhost.com/thread-36105.html

Adambean

Posted 2012-10-01T16:01:37.160

Reputation: 789

It doesn't like #/ at the end as suggested at the link you gave. It says The folder you entered does not appear to be valid. Please choose another. – mlt – 2014-10-08T20:55:03.477

1

You can use UNC path to create NTFS symlinks or Explorer shell links. You must be authenticated to the WebDav server prior access the link. For Explorer shell link I recommend CygWin tool "ln", because if you configure CygWin properly, shell links created by this tool can be interpreted as symlinks under CygWin runtime environment.

NTFS symlink

  • mklink /D "%WebDav_Link%" "\\%WebDavServer%\%WebDavRoot%\%RelPATH%"

Explorer shell link

  • "%CygWinBin%\ln.exe" -s '\\%WebDavServer%\%WebDavRoot%\%RelPATH%'
    '%WebDav_Link%'
  • to enable this works you must set under Windows environment a variable CYGWIN to "winsymlinks:lnk" (SET CYGWIN=winsymlinks:lnk)

Petr Matlas

Posted 2012-10-01T16:01:37.160

Reputation: 11

0

Yes.

UNC pah of WebDAV should be \\<host>@<port>\<path>\

You can use below command to create a dir symlink to a WebDAV server.

mklink /d dav \\127.0.0.1@12345\path\

You must specific a path, if you need to map to root, use DavWWWRoot instead.

mklink /d dav \\127.0.0.1@12345\DavWWWRoot

Now you can enjoy WebDAV.

PS. This feature dependent WebClient service on system.

IlPADlI

Posted 2012-10-01T16:01:37.160

Reputation: 101