Page 1 of 1

Wish to change filename by deleting 26 characters

PostPosted: Sun Oct 17, 2021 12:23 pm
by William1656
Can anyone help please with the following ?

My image files have all been renamed by the Windows Backup utility, so that a file named "20180714 Paris001.jpg" has now become:
"20180714 Paris001 (2021_08_03 14_51_22 UTC).jpg"

How do I delete the 26 characters to the left of the dot ?
I need to do this for several hundred files. I can put the files into the Bulk Rename Utility dialog page ok but I'm not sure which of the boxes to check, what to enter in the various boxes etc.

Thanks.

Remove last 26 characters

PostPosted: Mon Oct 18, 2021 2:22 am
by Luuk
To remove any last 26 characters, can use Filters(12) with 'Name Min'==27, then also Remove(5) with 'Last n'==26.
Also with using the Regex(1), this some different ways using 'Match' and 'Replace' to conduct the same...

Remove any last 26 characters...
(.+).{26}$
\1

Remove the last 26 characters if they start with ' (' and end with ')'.
(.+) \(.{23}\)$
\1

Remove the last 26 characters if they are much like the example date.
(.+) \(2021_\d\d_\d\d \d\d_\d\d_\d\d UTC\)$
\1

Re: Wish to change filename by deleting 26 characters

PostPosted: Tue Oct 19, 2021 7:51 am
by Admin
If the format is always :

<characters><space>(<timestamp>).jpg

then you could also use,

RegEx (1)
Match : %1 (%2)
Replace: %1
Simple: enabeld

This will truncate anything with a space followed by text between ( )