igrok Posted March 23, 2004 Posted March 23, 2004 (edited) Any way to copy a file from the filesystem to a webfolder (sometimes called webDAV)?I'd like to do that via a command line. With FileCopy it does not seem to workFileCopy("C:\somedir\*.htm", "http://aa.bb.com/dan/")Copying via explorer works fine, but I want to have this copy run every day by a automated (scheduled) task.Any idea?By the way, dos copy and otehr copy programs, like robicopy will not work.ThanksDan Edited March 23, 2004 by igrok
Developers Jos Posted March 23, 2004 Developers Posted March 23, 2004 You can try this with a commandline utility called CURL .... SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
igrok Posted March 23, 2004 Author Posted March 23, 2004 Thanks, JdeB. Unfortunately, that won't work. CURL is able to POST and to PUT. My http server does not allow this in the directory I am using. However, the directory on the server is open for WebDAV or web folder... It was worth a try. Neat utility this curl. I will keep it. Although it does not work for this case. Dan
sykes Posted March 23, 2004 Posted March 23, 2004 (edited) It seems that you can use the command net use to map a drive to a web address Net Use x: http://www.webaddress.com/foldername After doing that you could then use the FileCopy command You could even include the net use to connect and disconnect in the script if you didn't want to leave the mapped drive connected all the time. Edited March 23, 2004 by psichosis We have enough youth. How about a fountain of SMART?
igrok Posted March 24, 2004 Author Posted March 24, 2004 (edited) Oh. That would be elegant.Unfortunately, this does not work on my machine. I get the following error:System error 67 has occurred.The network name cannot be found.I see from the manual that it actuall should work. The fast response of the system, getting me the error, indicates that I have probably a name resolving issue... I will check..great hint!Dan Edited March 24, 2004 by igrok
sykes Posted March 24, 2004 Posted March 24, 2004 Instead of the actuall web address, you could use the IP address Net Use x: http://155.108.65.34/foldername *NOTE* Not an actual IP Address ... just one off the top of my head We have enough youth. How about a fountain of SMART?
igrok Posted March 24, 2004 Author Posted March 24, 2004 I think I have another problem. The commandline returns just too fast with the error 67. I started a sniffer (ethereal) to check on network traffic caused by the command net use x: http://... and guess what.. There is no traffic at all! (also not with an IP address) Repeating net use with any normal UNC (\\server\...) shows notable traffic. And the mapping works. Thus I guess my implementation of Webfolders or webDAV is buggy. I am running Windows XP SP1 and the .NET stuff is installed. According to Microsoft, the WebDAV redirector should work with plain Windows XP. The WebClient service is running fine. And as I said previously, drag and drop over explorer works fine to and from a webfolder.. Strange setup I seem to have. :-( Dan
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now