Topic "Require Synchronization for all files except last file"

Author Message
vishalmay
[View user's profile]

Joined: 2014-06-11
Posts: 2
Location: BENGALURU
Dear Team,

I am running Synchronization for local and remote.
In Local, i require all files to be synched except last file.

currently this is my script

open vishal@10.176.12.5
synchronize local "d:\cmdlogs\KKBNGBTPMBS02\"
exit
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24993
Location: Prague, Czechia
What does it mean "the last file"? The newest file?
_________________
Martin Prikryl
vishalmay
[View user's profile]

Joined: 2014-06-11
Posts: 2
Location: BENGALURU
thank you for reply.

yes you can say new file.

ex: there will be some 5 files in folder.
there will be 5 MB limit for each file
1st file will be generated, after 5MB second will be generated. other files follow the same
But last file will be the new one which will be modified upto 5MB
so i dont want to syn new or last file to local folder
please confirm how to do it.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24993
Location: Prague, Czechia
OK, see this example. It does opposite of what you need, so it should be pretty easy to modify it:
https://winscp.net/eng/docs/script_download_most_recent_file

Alternative, and way easier, solution is to filter files smaller than 5 MB:
Code:
synchronize local -filemask="|<5M" "d:\cmdlogs\KKBNGBTPMBS02\"

See https://winscp.net/eng/docs/file_mask
_________________
Martin Prikryl
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