Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

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

martin

Re: sftp automation from remote to local

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

sftp automation from remote to local

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
close
exit