Topic "How can I prevent overwriting existing files?"

Author Message
[View user's profile]

Joined: 2014-01-19
Posts: 1
Location: Norway
I've got this script:

# Automatically abort script on errors
option batch abort

# Disable overwrite confirmations that conflict with the previous
option confirm off

# Connect
open ftp://root:filebox@ -hostkey="xxx"

# Change remote directory
cd /media/hdd/docs

# Force binary mode transfer
option transfer binary

# Download file to the local directory
get *.txt H:\ftptest\

# Disconnect

# Exit WinSCP

And what it does it copies everything in that directory each time. Is there a way I can make it skip the file if it already exists in the target directory?
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24759
Location: Prague, Czechia
Please read FAQ:

If that does not help, come back.
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