Topic "Transfer only files that do not exist - wildcard based."

Author Message
Casper42
[View user's profile]

Joined: 2009-11-01
Posts: 2
Location: CA, USA
First off, I am pretty sure I cannot use the Synch command.
Remote Folder contains thousands of files.
Local Folder contains only a handful of files until they are processed, then they are moved to an archive folder.

I need to be able to transfer just today's files from remote to local, but I do NOT want to overwrite.

All the script examples I see have the following 2 lines:
option batch on
option confirm off

This will overwrite the files which I do not want.

I tried writing a script that said:
get 20091101*
w

In the hopes that the ne(w)ew option would be send to the prompt that appears when a file already exists, but no joy

So is there a way to only transfer newer files based on a wildcard as opposed to Synch mode?

I would love to see something simple like: option confirm newer
That would answer w for me for all file copy collisions.

Thanks
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24552
Location: Prague, Czechia
There's no really easy way to do that. But this example script may help you.
_________________
Martin Prikryl
bluemuppet
[View user's profile]

Joined: 2012-01-05
Posts: 2
Location: Australia
Is the answer to this any different with the latest version of WinSCP? (4.36)

I'm looking for a way to only download remote files that do not exist locally, or are newer than the local file.

Thanks.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24552
Location: Prague, Czechia
bluemuppet wrote:
I'm looking for a way to only download remote files that do not exist locally, or are newer than the local file.

That's just plain synchronization. It not the same complicated problem as this thread is about.
See http://winscp.net/eng/docs/task_synchronize_full
_________________
Martin Prikryl
bluemuppet
[View user's profile]

Joined: 2012-01-05
Posts: 2
Location: Australia
Thanks - when I looked at this earlier today I didn't realise you could specify direction - it looked as though it always treated the local folder as the 'master'.
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