Hi,
I'm trying to change the exif dates of a bunch of files based on the filename. I've tried using exiftool "-AllDates<Filename", but it gets tripped up by some digits that appear at the start of the filename - these are formatted eg 00097158-PHOTO-2023-09-24-17-43-57.jpg
Is there a way to ignore the first 8 characters in the filename when doing this?
Thanks!
Try
exiftool "-AllDates<${Filename;s/^\d+//}" /path/to/files/
This uses Perl Regular Expressions (RegEx) to strip away all numbers from the start of the filename.
This command is for Windows CMD. Change the double quotes into single quotes for Mac/Linux.
That did the trick nicely, thanks!