Topic "Overwrite"

Author Message



I have my WinSCP to transfer files from 1 SFTP site to another every morning, but for some reason i cant get it to overwrite my local files on download or the second SFTP site on upload. am i missing something?

Code inclosed below: (File Names and Servers changed to generics)

# Automatically abort script on errors
option batch abort
# Disable overwrite confirmations that conflict with the previous
option confirm off
open Server1
# Force binary mode transfer
option transfer binary
# Download file to the local directory c:\
get file1.txt c:\file\
get file2.txt c:\file\
get file3.txt c:\file\
get file4.txt c:\file\
get file5.txt c:\file\
get file6.txt c:\file\
get file7.txt c:\file\
get file8.txt c:\file\
get file9.txt c:\file\
# Disconnect
# Connect to a different server
open server2
# Upload the file to current working directory
put c:\file\file1.txt
put c:\file\file2.txt
put c:\file\file3.txt
put c:\file\file4.txt
put c:\file\file5.txt
put c:\file\file6.txt
put c:\file\file7.txt
put c:\file\file8.txt
put c:\file\file9.txt
# Disconnect
# Exit WinSCP
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24759
Location: Prague, Czechia
Please attach a full log file showing the problem.

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

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!


About donations

$9   $19   $49   $99

About donations


WinSCP Privacy Policy

WinSCP License