Formatting when renaming from Exif Data possible?

Advanced Renamer forum
#1 : 03/09-24 16:43
Teredactle
Posts: 2
Hi everyone,

First off, what an awesome tool, kudos to the devs that bring us this, allowing us for proper organization in our media files!!

I have a question (maybe simple) on formatting the way the date is written, when grabbed from Exif tag:

<ExifTool:DateTimeOriginal>-<Name>

So I want to rename my MP4 files using this method, which gives the accurate time when the clip was taken; this tag brings back (the date time in) this format:

Date Time: 2024:08:01 20:22:42-04:00
Format on file name using the <> above: 2024_08_01 20_22_42-04_00-Name

I want it to be 2024.08.01.20.22.42-04_00-Name (don't really need the -04_00, but I can leave it there)

Is there a way to format it this way and incorporate it in this: <ExifTool:DateTimeOriginal>-<Name>?

Thank you kindly

#2 : 03/09-24 18:29
Delta Foxtrot
Posts: 363
Reply to #1:

Hello Teredactle, welcome,

First off, go to Options/Settings/Renaming and check the entry named "Replace unsupported with:". It's probably set to an underscore. Change it to a period and there's most of your problem solved.

You will still have a space, most likely, between date and time. Just add a Replace method below the current method and replace the FIRST space with a period. I say only the first occurrence so if there are spaces in <Name> they won't be effected.

I can't advise you about the -04:00 at the end of the Exif tag because that doesn't show on the files I tried this on. I can tell you that the colon will be replaced with a period, since it's an unsupported character. Therefore you can PROBABLY use a Replace method using a regular expression like this:
Replace: -(\d\d)\.(\d\d)-
Replace with: -$1_$2- [to leave that part in] OR just a dash - to leave it out.
(Make sure regular expressions is checked)

Best,
DF
#3 : 05/09-24 05:47
Teredactle
Posts: 2
Reply to #2:

Thank you; I figured out the dash with the decimal, a bit after posting :)
The replace part I didn't, but with your help, I have now my workflow possible for all iPhone videos!!

Thank you kindly!