process only recently added files within a folder?

Running FileBot from the console, Groovy scripting, shell scripts, etc
Post Reply
AbedlaPaille
Posts: 107
Joined: 12 Apr 2020, 04:02

process only recently added files within a folder?

Post by AbedlaPaille »

Something like --filter "age < 3" but for date added instead of release date?
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: process only recently added files within a folder?

Post by rednoah »

What does "date added" mean exactly?


:idea: Here's the information we do get from TheTVDB, and so we don't have a Date-Added field for individual Episode records:
https://pastebin.com/6VE4V5Sn
:idea: Please read the FAQ and How to Request Help.
AbedlaPaille
Posts: 107
Joined: 12 Apr 2020, 04:02

Re: process only recently added files within a folder?

Post by AbedlaPaille »

Date added to the computer i meant. AKA the Date created and/or modified fields in your Explorer.
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: process only recently added files within a folder?

Post by rednoah »

Have you tried the --file-filter option yet?
viewtopic.php?t=4222

e.g.

Code: Select all

--file-filter "age < 3"
:idea: Please read the FAQ and How to Request Help.
AbedlaPaille
Posts: 107
Joined: 12 Apr 2020, 04:02

Re: process only recently added files within a folder?

Post by AbedlaPaille »

Thank you master, works like a charm.
AbedlaPaille
Posts: 107
Joined: 12 Apr 2020, 04:02

Re: process only recently added files within a folder?

Post by AbedlaPaille »

Just a little thing. Windows stores 3 file ages. Date created, date modified and media created. The snippet you linked is for media created. Can i change it to date created?
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: process only recently added files within a folder?

Post by rednoah »

I guess {age} prefers to use the embedded media creation date. Using -no-probe will disable media parsing and allow {age} to default to the file creation date instead. Alternatively, you can use {f.creationDate} directly and then do the math yourself.
:idea: Please read the FAQ and How to Request Help.
AbedlaPaille
Posts: 107
Joined: 12 Apr 2020, 04:02

Re: process only recently added files within a folder?

Post by AbedlaPaille »

You're the most helpful dev of all time.
AbedlaPaille
Posts: 107
Joined: 12 Apr 2020, 04:02

Re: process only recently added files within a folder?

Post by AbedlaPaille »

For reference i ended using --file-filter with {f.age}, as {f.creationDate} gave me numbers i couldn't understand and -no-probe with {age} only caught subtitle files.

--file-filter "f.age < 0.04" (1 hour) is useful to for example automatically generate hardlinks as a post process to the amc script, it'll reduce the disk load compared to deleting and regenerating the whole library.
Post Reply