Topic "Multiple Files"

Author Message
Caveo

Guest


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
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24530
Location: Prague, Czechia
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.

_________________
Martin Prikryl
Caveo

Guest


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?
log_test.txt (7.4 KB) [Download]

Description: (none)

Caveo

Guest


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.
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License