Sync file with daily partial name change

Get help for specific problems
Posts: 2
Joined: 11 Sep 2023

jez

Hi guys

I'm sure it's very simple but I can't work this out.

I have a file that changes it's name partially each day due to the date, so today it's lists_current_all_20230914.csv, tomorrow it will be lists_current_all_20230915.csv, the day after that it will be lists_current_all_20230916.csv etc etc.

I need to exclude files with similar names that do the same thing with last few digits:
list_current_20230913.csv
list_obsolete_20230913.csv
listsnz_current_all_20230913.csv

How do I use the wildcards to only pick up the lists_current_all_*** file up so it will update each day?

Any help would be greatly appreciated.

Thanks,
Jez
User avatar
Posts: 2946
Joined: 22 Aug 2012

Plerry

The problem is you would probably want to exclude all lists_current_all_ -files, except for the most recent one (todays one).
Then, adding lists_current_all_????????.csv to your Exclude Filter does not work, as that would also exclude the most recent one.

If you really generate a new file-version each day (including during weekends and Holiday's) to can try if the time-span option (bottom-right in the FFS GUI Filter window does the job, using Today or Last x-days with x set to 2.
Posts: 2
Joined: 11 Sep 2023

jez

thank you so much for the reply Perry.

these 4 files are all generated overnight but i only want lists_current_all_????????.csv to sync. i may be misunderstanding how the time-span filter works but i'm not sure it will be an option.

would adding lists_current_all_????????.csv to the Include filter work (in that format)? and then add the other 3 files to the exclude list like this?
list_current_????????.csv
list_obsolete_????????.csv
listsnz_current_all_????????.csv

i did try some variations of things in the include and exclude lists but didn't have any luck.
User avatar
Posts: 2946
Joined: 22 Aug 2012

Plerry

> would adding lists_current_all_????????.csv to the Include filter work

No, you should not add that to the default Include Filter * (=include everything),
but instead replace the default entry * by lists_current_all_????????.csv (obviously with the correct relative path to the left-and right base location).
You do then not need to exclude the other files, as those will not be included in the first place.

In the FFS Manual page on the Include/Exclude Filter you can see that a ? (question mark) is a wildcard that stands for any single character.
So, the 8 question marks in lists_current_all_????????.csv stand for any 8 consecutive arbitrary characters (so, not just numbers).
Obviously, this would still match all lists_current_all_xxxxxxxx.csv files, not just the most recent one.
Not really a problem. FFS will then still Compare these earlier versions, but conclude that those earlier versions have not changed (timestamp identical), and thus not sync them again.
But the TimeSpan feature may also help here.