Restore original Canon filenames using FileNumber

Started by Archive, May 12, 2010, 08:54:20 AM

Previous topic - Next topic

Archive

[Originally posted by adrianb on 2008-05-06 14:50:43-07]

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?

Archive

[Originally posted by exiftool on 2008-05-06 22:15:50-07]

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