Friday, January 21, 2011

Create WebDAV Connection via Batch File

Deutsche Version dieses Postings.

If you find any documentation how to create a WebDAV connection on Windows (Windows Vista, Windows 7 and alike) it will always come to a bunch of dialogs you have to fill in. But as soon as you don’t want a persistent connection but only a connection on demand you will hate this procedure.

Instead it is much simpler to create a WebDAV connection via net use. And if you put it into a batch file you could easily execute it any time you need the connection. Having it linked to your desktop the WebDAV connection is even only a click away — "WebDav on demand" so to say.

The following Batch file can be reduced to one simple line but for convenience I made it more chatty and I skipped specifying a password as this is (for sure) a security risk.