Transfer only files that do not exist - wildcard based.

Advertisement

Casper42
Joined:
Posts:
2
Location:
CA, USA

Transfer only files that do not exist - wildcard based.

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

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
27,252
Location:
Prague, Czechia

Re: Transfer only files that do not exist - wildcard based.

There's no really easy way to do that. But this example script may help you.
_________________
Martin Prikryl

Reply with quote

bluemuppet
Joined:
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.

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
27,252
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 https://winscp.net/eng/docs/task_synchronize_full
_________________
Martin Prikryl

Reply with quote

bluemuppet
Joined:
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'.

Reply with quote

Advertisement

You can post new topics in this forum