Post a reply

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

Dinduch

Yes, that's the base, where i started. And yes, the proxy settings where added to the open script, but this didn't help. I'l try it a little more, when i have more time.
Dinduch

Many thx for your help. I have found a solution based on your answer. If i remove the slash for the root remote folder, the upload works as expected.

Now I'm on a other computer where i must use a corporate proxy. But this didn't work. I could successfully authenticate at the proxy, but after something blocked the download. But if i use the WinSCP GUI, i can up-/download all what i want. For now, i must give up to use the script. But maybe I'll try it later again.

Again many thx for your help.
martin

Re: Problem uploading single file

Try this (note the added slash in open command and removed slash in put command):

open davs://user:password@mac.machine.com/dav/files/ -rawsettings CacheDirectories=0 CacheDirectoryChanges=0


lcd c:\tmp
put test.txt
exit


If this dos not help, attach a full session log file showing the problem (using the latest version of WinSCP).

To generate the session log file, use /log=path_to_log_file command-line argument. Submit the log with your post as an attachment. Note that passwords and passphrases not stored in the log. You may want to remove other data you consider sensitive though, such as host names, IP addresses, account names or file names (unless they are relevant to the problem). If you do not want to post the log publicly, you can mark the attachment as private.
Dinduch

Problem uploading single file

Maybe i didn't understand the concept of the scripting here, but i have problems with that simple upload of a single file. I have the following script:

open davs://user:password@mac.machine.com/dav/files -rawsettings CacheDirectories=0 CacheDirectoryChanges=0


lcd c:\tmp
put test.txt /
exit


This is just for a simple test and should extended later. The WebDAV Server is at mac.machine.com/dav/files (an not the root path). The file to upload is in c:\tmp and should be uploaded to the root of the webdav (which is mac.machine.com/dav/files/). But all what i get is a 404 (not found) error. I didn't see where my problem is :-(

BTW: I call the script with
"c:\Program Files (x86)\WinSCP\winscp.exe" /log=c:\tmp\script.log /ini=nul /script=c:\tmp\script.txt