Page 1 of 1
Can I rename without matching?
Posted: 16 Dec 2019, 13:25
by vman
I have a matching problem that I "think" can be fixed if I first improve the name of the file (produced automatically by my DVR in a format I can not change).
Here is my existing format:
Code: Select all
NBC Nightly News (1970) - 2019-12-12 06 00 00 - 12-13-2019.ts
The date at the end of the filename is accurate (12-13-2019) but the first date is not (2019-12-12).
Filebot uses that first date to do the matching, but since it is the wrong date, filebot matches the wrong episode.
Is there a way to automatically rename this file as follows:
Code: Select all
NBC Nightly News (1970) - 12-13-2019.ts
If I do this manually, Filebot then does it's magic and all is well.
Re: Can I rename without matching?
Posted: 16 Dec 2019, 14:18
by rednoah
FileBot does take all dates into consideration, but I suppose if there's a new episode every single day, then things get a bit too ambiguous.
You can use FileBot for generic renaming & pre-processing file names:
viewtopic.php?t=2072
e.g. match the last 12-13-2019 pattern and then re-arrange the numbers to 2019-12-13
Code: Select all
(fn =~ /(\d{2}).(\d{2}).(\d{4})/)[-1][3, 1, 2].join('-')
e.g. as complete generic file format, this should do, get the part before the dash, i.e. the series name, and then add the nicely formatted date:
Code: Select all
{fn.before('-')} - {(fn =~ /(\d{2}).(\d{2}).(\d{4})/)[-1][3, 1, 2].join('-')}
Re: Can I rename without matching?
Posted: 16 Dec 2019, 16:19
by vman
Super helpful and worked perfectly with CLI also:
Code: Select all
filebot -rename -non-strict * --format "{fn.before('-')} - {(fn =~ /(\d{2}).(\d{2}).(\d{4})/)[-1][3, 1, 2].join('-')}"
Any thoughts/resources on filtering out the already-renamed files? If I run that cli on files that have already been processed once they go from:
Code: Select all
NBC Nightly News (1970) - 2019-12-13.ts
to
This will become an issue when I automate the script.
Re: Can I rename without matching?
Posted: 16 Dec 2019, 17:31
by rednoah
The
06 00 00 bit seems to be quite unique, so we can use
--file-filter to only include files that have that one:
Re: Can I rename without matching?
Posted: 16 Dec 2019, 17:49
by vman
TY So much!
Re: Can I rename without matching?
Posted: 16 Dec 2019, 20:10
by vman
I just looked at today's recording and the filename is exactly the same as on Friday. As such, I need to add today's date to the filename. Is this possible? {ny} and other "y"s are related to the movie/series data it seems.
Re: Can I rename without matching?
Posted: 16 Dec 2019, 20:29
by rednoah