ExifTool Forum

ExifTool => Archives => Topic started by: Archive on May 12, 2010, 08:54:29 AM

Title: File Rename
Post by: Archive on May 12, 2010, 08:54:29 AM
[Originally posted by jmoliver on 2008-12-27 18:15:38-08]

Hi,

Can exiftool rename a file such as "IMG_1234.JPG" to "081227-1234.JPG" where the "IMG_" is replaced with the date yymmdd?
Title: Re: File Rename
Post by: Archive on May 12, 2010, 08:54:29 AM
[Originally posted by exiftool on 2008-12-28 12:35:51-08]

Code:
exiftool -d %y%m%d-%%-4f.%%e "-filename<datetimeoriginal" FILE

where FILE is one or more file or directory names.

The %%-4f takes the last 4 characters of the filename.

I suggest adding the -v option when you run this command
so you can see what files have been renamed to what.

- Phil