Thread

Posted on Tue May 6 17:50:43 2008 by adrianb
Restore original Canon filenames using FileNumber
Hi In case you aren't familiar with Canon file naming, the images are saved onto the memory card with directory structure and filename: yyy\IMG_xxxx.jpg (OK this is somewhat simplified as the second two directory digits are specified by the first two digits of the filename counter). The FileNumber tag is accordingly saved as yyy-xxxx. I am trying to restore original filenames of photos using this tag, but don't know how to crop out the first four letters of the FileNumber. At the moment I am using the string (in the 'Target' box of a Windows shortcut) exiftool.exe -filename<IMG_$FileNumber.jpg which results in files named IMG_yyy-xxxx.jpg, as you would expect. How do I stop the yyy- getting into the new filename?
Direct Responses: 7826 | Write a response
Posted on Wed May 7 01:15:50 2008 by exiftool in response to 7821
Re: Restore original Canon filenames using FileNumber
I suggest using the directory number in the file name (this is what the canon utilities do when you use the to download images). This way there is no duplication once you hit 10000 images. But if you really want to remove the directory number, you can do this with a user-defined tag. See the example config file and use '$val =~ s/\d+-//; $val' for the ValueConv. - Phil
Write a response