Topic "sftp automation from remote to local"

Author Message


Sorry for the question; but have spent all day on this. my script is connecting to the database; but it isn't downloading then deleting the files from the Remote server to the local machine. I'm not sure what I have wrong and can connect with all - F6 from the "CHANNELNAME" works correctly; but the script below is aligned in schedule tasks; not returning any errors; but not returning any data or deleting any data. (*NOTE the RSA KEY IS VERIFIED ACCURATE/STRIPPED FOR SECURITY)

# Do not to stall on errors
option batch on
# Disable overwrite confirmations
option confirm off
# Connect
open CHANNELNAME -hostkey="ssh-rsa 2048 xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx"
# Set automatic transfer mode to accomidate PDF and HL7 text files.
# Text file extentions are stored in WinSCP.ini
option transfer automatic
# Download and then delete remote files.
# Local and remote directories are stored in WinSCP.ini
get *.* .\ -delete
# Disconnect
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 27106
Location: Prague, Czechia
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 can mark the attachment as private.

You can post new topics in this forum


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!


About donations

$9   $19   $49   $99

About donations


WinSCP Privacy Policy

WinSCP License