On the OT list recently the question was asked: "Does anyone know of an FPSE (Front Page Server Extensions/WebDAV) client that works on the command-line?"
The fellow basically wanted to XCOPY/COPY files from his machine to a remote site from the command line. I recommended the ridiculously powerful SynchronEX. I use it to automate the backup of my site from FTP (XFTP actually, maintaining file dates!) nightly, which is then backed up by my Iomega Rev Drive's Automatic Backup Pro Software. It's more than just a command-line tool, it's a complete scriptable beast with two-way sync and multiple remote file system support.
Later, John Schroedl responded with this built-in-to-Windows-XP tasty tip:
net use * http://www.webdav.org/ passwrd /user:usernameHe notes a caveat "Windows XP assumes that any WebDAV repository begins at the root of the server path. If a user mounts http://www.example.com/hr/ergonomics, then the OPTIONS request to http://www.example.com/ must show WebDAV support or the Redirector will fail."For example:C:\>net use * http://foo/Bar/SomeDirectory XXXXXXX /user:scottDrive Z: is now connected to http://foo/Bar/SomeDirectory.The command completed successfully.C:\>dir z:Volume in drive Z has no label.Volume Serial Number is 0000-0000Directory of Z:\12/22/2004 05:01 PM <DIR> .12/22/2004 05:01 PM <DIR> ..12/09/2004 03:37 PM 2,335 File.egp12/22/2004 05:01 PM <DIR> TestDir 1 File(s) 2,335 bytes 3 Dir(s) 2,620,660,736 bytes free
net use * http://www.webdav.org/ passwrd /user:username
He notes a caveat "Windows XP assumes that any WebDAV repository begins at the root of the server path. If a user mounts http://www.example.com/hr/ergonomics, then the OPTIONS request to http://www.example.com/ must show WebDAV support or the Redirector will fail."
For example:
C:\>net use * http://foo/Bar/SomeDirectory XXXXXXX /user:scottDrive Z: is now connected to http://foo/Bar/SomeDirectory.
The command completed successfully.
C:\>dir z:Volume in drive Z has no label.Volume Serial Number is 0000-0000
Directory of Z:\
12/22/2004 05:01 PM <DIR> .12/22/2004 05:01 PM <DIR> ..12/09/2004 03:37 PM 2,335 File.egp12/22/2004 05:01 PM <DIR> TestDir 1 File(s) 2,335 bytes 3 Dir(s) 2,620,660,736 bytes free
From here you can use the command shell commands (XCOPY/COPY) to work with DAV as any other drive. A great tip!
Scott at DevReach in Bulgaria in October
Developer Stand up Comedy - Coding 4 Fun
TechDays/DevDays Netherlands and Belgium:
Posts by Category Posts by Month
Greatest Hits Dev Tools List