Page 1 of 1

--file-filter using date last modified

Posted: 09 Jun 2022, 05:29
by Fiorelli
Hi - how can I filter Filebot to run only on files last modified since a certain date? I'm currently testing the following:

Code: Select all

filebot -script fn:amc volume1/Downloads/FileBot --output /volume1 --action test -non-strict --def seriesFormat="/TV Shows/{n}/Season {s00}/{s00e00} - {t}" movieFormat="/Movies/{n} [{y}]/{n}" --file-filter "file.lastModified > 2022-06-01"
This doesn't work, but I don't know whether I'm incorrectly specifying the argument (file.lastModified), the date format, or both.

Thanks in advance.

Re: --file-filter using date last modified

Posted: 09 Jun 2022, 11:01
by rednoah
e.g. select files less than 7 days old:

Code: Select all

--file-filter "age < 7"

e.g. select files since the specified date string:

Code: Select all

{ f.lastModified().toDate().format('yyyy-MM-dd') > '2022-06-01' }


EDIT:

FileBot r9237 improves support for Date <=> String compare:

Code: Select all

{ f.lastModified().toDate() > '2022-06-01' }

EDIT 2:

In FileBot 4.9.6 the {age} is based on the media creation date {dt} which may be quite different from the Last-Modified date. FileBot r9238 adds the {ct} file creation date binding and changes how {age} works depending on the context to better support simple find -mtime type use cases:

Code: Select all

{ ct > '2022-06-01' }

Re: --file-filter using date last modified

Posted: 10 Jun 2022, 08:04
by Fiorelli
Perfect, many thanks.