Help - Rename Dated filenames to fix Daylight Savings adjust

Post any Bulk Rename Utility support requirements here. Open to all registered users.

Help - Rename Dated filenames to fix Daylight Savings adjust

Postby grawggy.nites » Fri Dec 09, 2022 10:23 am

Hi, first time poster here! Loving this app, it reminds me of how I used to use foobar2000 to manage the heck out of my massive music collection, but for all filetypes.

This help request comes are a two-parter, I guess. So, background info to start:
Syntax

• I'm using a digital audio recorder which automatically date+time-stamps the files it records as follows:
Code: Select all
RYYYYMMDD-HHMMSS

Notably, this is the timestamp the file was *created* at, and the Date Modified meta tag is equal to the creation time plus the recording duration/length == when it saved the file at recording completion.

But the "Created" meta tag in Windows is generated as the date+time-stamp of the *individual file's creation date* when copied to that local machine, so it does not match.
This feature has been a part of Windows' native behaviour for ages and it is so **king irritating I can't even express my frustration in words.

When checking things in Explorer and other file manager apps on my phone which cannot view the "Length" meta as a column, I am able to use this logic to quickly assess the duration of the recording.
I am mostly recording phone calls and interviews, so it's very helpful to be able to sort by File Modified meta value and see how long the recording is by the filename's timestamp.

To keep things organised for myself, I append a title to the filename to include info as follows:
Code: Select all
- Business Name [Individual's Name] (Subject of discussion)



Puzzle #1—

• I've just encountered an issue renaming the filenames after recognizing that I didn't reset my recording device's clock for the recent Daylight Savings roll-back (minus one hour).
TL;DR:
Is there any way to simply subtract one hour from my filenames' timestamps?


— Fixing the File Modified ("recording complete") metadata date is simple by using the Delta function...
But adjusting the filename's HH value is proving difficult to logic for me.

The Numbering (10) function would allow me to pick a position and starting value, but I'm not addingI'm subtracting. And, not sequentially so—but simply "-1" in relation to the existing value of each individual file. So that doesn't seem to work at all.

Delta would be perfect, but it's not an option for the filename data, just meta timestamp tags...

If I run a batch and change the Modified timestamps through Special (14) Delta, that fixes that issue but not the "recording completed" timestamp which is what the filename ends up as when it's originally generated to begin recording.

I can't solve it by running a batch on the Modified tag timestamp and then copying that to the beginning of the filename using formatting adjustments because that's not the "recording started" timestamp.


Puzzle 2—

• Then I was thinking, maybe a solution work-around—Is there any way to extract the "hour" time from the filename and place it somewhere like a "custom" tag, then operate a "subtract one" function on that two-digit value and pass it back to append to the filename after a "Remove" operation on positions 11 & 12, or as a "Replace" operation to those positions?

EXAMPLES:

R20221206-172140 - BusinessName [Agent] (Topic, details, more details).wav `<(Date Modified)>` 2022/12/06 18:20:24
--
R20221206-162140 - BusinessName [Agent] (Topic, details, more details).wav `<(Date Modified)>` 2022/12/06 17:20:24
• Length == 00:58:43

This seems hard to do with a simple "Replace" without sorting the list manually by the hour value and then running a Replace (3) string that is long as hell to declare each hour increment of the 24 possible in Replace and the prior hour for each in With. That seems ridiculous. I'm sure one of you RegEx or JavaScript ninjas can help me with a much simpler "if-then" solution.

Thanks for coming to my Ted Talk :mrgreen:
grawggy.nites
 
Posts: 2
Joined: Fri Dec 09, 2022 5:24 am

Re: Help - Rename Dated filenames to fix Daylight Savings adjust

Postby grawggy.nites » Fri Dec 09, 2022 7:42 pm

Mistake edit:
If I run a batch and change the Modified timestamps through Special (14) Delta, that fixes that issue but not the "recording completed" timestamp which is what the filename ends up as when it's originally generated to begin recording.

Should've read as:
If I run a batch and change the Modified timestamps through Special (14) Delta, that fixes that issue but not the "recording started" timestamp — which is what the filename ends up as when it's originally generated to begin recording.


Sorry about that. It was late when I posted... #usernamechecksout :lol:

OP TL;DR:
Filenames are created as "RYYYYMMDD-HHMMSS" by my device.
("R" at start for "recording" I suppose...)
? [color=#FF0000]I need to adjust the HH to subtract one value from the two-digit number to adjust for Daylight Savings Time having ended ? (stupid American nonsense)

but cannot figure out how to do this with the given options without JavaScript since Numbering (10) only counts up, I'm not great with RegEx yet, and Delta only applies to timestamp attribute tags.

NB: It's been years since I've used fb2k to manage music files and now I'm inspired to get back into RegEx logic... but I thought someone in the community may be able to hand me a solution quicker than I could figure this out and I could move on getting my files organised and just study up on my RegEx later. xb
(I only knew CSS, I always used jQuery plugins to take care of my JS needs and now I'm regretting it.)

NB:
I thought maybe there was a way to just use the Delta-adjusted "Date Modified" attribute and then subtract the recording Length from it and reformat that to HHMMSS, and then pass the result as a 'Replace' operation to the Filename, but the 'Length' attribute isn't returning results I understand.

The numbers given are plain integers and they don't seem to be in "seconds" because dividing the results by 60 does not produce the actual audio recording length.
I'm thinking maybe this is an Image file attribute and it's just giving something random when requested from audio files (?) idk
grawggy.nites
 
Posts: 2
Joined: Fri Dec 09, 2022 5:24 am


Return to BRU Support