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

Caveo

Re: Multiple Files

I answered my own question. The permission errors were causing the upload script to close.

This script works:

option batch on
option confirm off
open sftp://username@server.com -hostkey="ssh-rsa 1024 AA:AA:AA"
cd /incoming/test
put -nopermissions -nopreservetime E:\folder\Filename*
exit


Thank you for your assistance in directing me to the log files.
Caveo

Re: Multiple Files

The log is attached.

Line 70 in the log says "Copying 3 files/directories to remote directory" which is correct. There were 3 files when this was ran.

Line 93 says "Upload of file 'PosPay_1005_08202013_095943.txt' was successful, but error occurred while setting the permissions and/or timestamp. If the problem persists, turn on 'Ignore permission errors' option. ("Permission denied."

Would these errors cause the script to abort after the first file is transferred?
martin

Re: Multiple Files

Your code looks ok. Please attach a full log file showing the problem (using the latest version of WinSCP).

To generate 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 may email it to me. You will find my address (if you log in) in my forum profile. Please include link back to this topic in your email. Also note in this topic that you have emailed the log.
Caveo

Multiple Files

I am having an issue with my script not picking up multiple files. It will only grab the first file in the directory and then stop. How do I need to modify this script to upload multiple files? The files have different extensions which is why I used the mask filename*.

option batch on
option confirm off
open sftp://username@server.com -hostkey="ssh-rsa 1024 AA:AA:AA"
cd /incoming/test
put E:\folder\Filename*
exit