Mapping/Connecting a Drive Letter to a WebDAV or Front Page website
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: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."
C:\>net use * http://foo/Bar/SomeDirectory XXXXXXX /user:scott
Drive Z: is now connected to http://foo/Bar/SomeDirectory.
The command completed successfully.
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.egp
12/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 Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.
I was that fellow. :) Unfortunatley, this only works with WebDAV and not with FPSE, which use their own goofy protocol over HTTP. I'm still hunting for something that works with FPSE.
I'm having trouble getting the WebDAV Redirector to work with XCOPY and subdirectories. Everything works well with a single directory, but once I use xcopy /s I get:
File creation error - The directory is not empty
Unable to create directory - N:\winton\sub
Also, everything works perfectly if I copy and paste the files using Windows Explorer. The problem only appears with XCOPY.
I'm using XP Pro SP2 client and IIS 5.1 (also on XP Pro SP2) server.
Thanks for any thoughts.
well I tried this, but I only get errors like Directory not found, etc. Do I have to start any services or need to set some special parameters?
Do you know much about the WebDAV Protocol?
The server log when I want to connect is:
http-80-Processor25, 22-Jul-2005 12:02:14, unauthenticated, PROPFIND, 207 "Multi-Status", 219 ms, /
when I connect via firefox the log is:
http-80-Processor24, 22-Jul-2005 12:07:35, unauthenticated, GET, 200 "OK", 172 ms, /
well now, do you think I have to change the server's config?
but how? and to what?
what servers do you use?
Many Questions, but I hope I'll get some answers
Comments are closed.