Topic "Synchronize problem with directory mask newer than 1 year"

Author Message
AvalonNYC
[View user's profile]
Donor
Joined: 2017-01-14
Posts: 4
Location: New York
Using WinSCP 5.9.5 (Build 7441) on Windows Server 2008 R2 with Commander interface connecting to a Windows Server 2008 R2 FileZilla FTP Server.
Trying to synchronize remote directory tree, excluding files and directories older than 1 year.
I'm using the mask *>=1Y; >=1Y/
It appears to be ignoring the mask completely and transferring all the data, so I must be doing something stupid.
Separately, I guess a directory mask can't be like *>=1Y/ since says "mask is invalid" when I put the asterisk in.
Once I get this fixed, will move to scripting it to sync every hour.
Thanks!
TestWebsiteDocsSync@tms.cnwglobal.com.log (774.8 KB) Private file

Description: Log

WinSCP sync test.pdf (162.16 KB) [Download]

Description: PDF - Screen prints

Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 26572
Location: Prague, Czechia
Time and size constraints are not allowed in directory masks.

---

If they were, it would be */>=1Y

The 1Y/ is an invalid constraint. WinSCP 5.9.x and older silently ignores invalid constraints, effectively making the mask catch-all *.

In WinSCP 5.10 and newer, you will get "Mask is invalid near '=1Y/'."
Guest




Thanks.
Do you have a suggestion how one would sync a folder tree but exclude folders older than a specified date?

Thanks,

John
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 26572
Location: Prague, Czechia
You can write a PowerShell script that filters what you want.

You can base your script on this example:
https://winscp.net/eng/docs/library_example_recursive_download_custom_error_handling
Advertisements

You can post new topics in this forum






Search

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