Enhancement request - Replace count backwards? - Replace underscores in exif added into filenames

Advanced Renamer forum
#1 : 29/08-21 00:28
Vicki
Vicki
Posts: 4
I have added the exif tags "'<ExifTool:Title>'" and then "(<ExifTool:Duration>)" into filenames.

I want to change the duration format from "0_00_00" to "0h00m00". (Note: this same format could also be in the added Title!)

I tried using the replace box, but there are an unknown number of underscores in the imported Titles, so the position of the underscore cannot be set using the 1st/2nd box from the start.

It could be set from the end, if there was a backwards tick box?

Or is there another way to achieve this please?

Many thanks, Vicki (v3.88)


29/08-21 00:28 - edited 29/08-21 00:38
#2 : 29/08-21 14:57
David Lee
David Lee
Posts: 1125
Read the User Guide: https://www.advancedrenamer.com/user_guide/regul ar_expresions

Simply replace (\d)_(\d{2})_(\d{2}) with \1h\2m\3


29/08-21 14:57
#3 : 29/08-21 22:12
Vicki
Vicki
Posts: 4
Reply to #2:
Thank you for that, i will have a go at learning regex... my concern is that similar patterns in the imported titles may be replaced if I don't specify the position?

A "Backwards" tick box would be a much simpler solution, if it is not too difficult to do...

In the meantime, my workaround was to add the Titles after reformatting the duration. :)


29/08-21 22:12 - edited 29/08-21 23:12
#4 : 29/08-21 23:00
David Lee
David Lee
Posts: 1125
Reply to #3:
Replace (\d)_(\d{2})_(\d{2})$ with \1h\2m\3

"$" signifies the end of the string so the pattern will only be matched when it occurs at the end of the filename.


29/08-21 23:00