Access to history sequence date

Running FileBot from the console, Groovy scripting, shell scripts, etc
Post Reply
tpc
Posts: 5
Joined: 04 Dec 2017, 01:23

Access to history sequence date

Post by tpc »

After reading this post viewtopic.php?f=4&t=5#p2459 I was unable to figure out how to access the actual date stored in the history.xml. I've tried each of the following with no luck. I'd like to obtain the delta between the prior run and the latest run in order to get a list of files that were processed during the latest run.

filebot -script fn:history --format '${date}\t${from}\t${to}' > history.tsv
filebot -script fn:history --format '${sequence}\t${from}\t${to}' > history.tsv
filebot -script fn:history --format '${sequence.date}\t${from}\t${to}' > history.tsv

How can I get the actual date from history?

Great tool!
Licensed filebot supporter!
User avatar
rednoah
The Source
Posts: 22975
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Access to history sequence date

Post by rednoah »

Unfortunately, the information you seek is not exposed to the history script.

The from/to variables are the only available variables in your custom GString expression.

If you need dates and times, then reading the xml file yourself is the only option.
:idea: Please read the FAQ and How to Request Help.
tpc
Posts: 5
Joined: 04 Dec 2017, 01:23

Re: Access to history sequence date

Post by tpc »

I had considered that option but thought that I would check if date was exposed before I went that route.

Thank you for the fast reply and for the superb tool!
Licensed filebot supporter!
tpc
Posts: 5
Joined: 04 Dec 2017, 01:23

Re: Access to history sequence date

Post by tpc »

For those who may be interested in doing this programmatically using the raw history xml, here's some xpath to query for those entries that were added since the prior run.

Code: Select all

//sequence[@date>"2017-12-04T03:07:21.718Z"]
Licensed filebot supporter!
Post Reply