ExifTool Forum

ExifTool => Newbies => Topic started by: MichiMuc on June 10, 2012, 05:25:18 AM

Title: MOV files rename with creation date
Post by: MichiMuc on June 10, 2012, 05:25:18 AM
hi everybody,

i´m sorry, but i can´t understand the answers already given to this problem.

can somebody please help me and solve my problem from the beginning?

i only want to change the file name of mov-files created with an iphone.

the files are at: "D:\Eigene Dateien\Eigene Bilder\Temp"
an should become a name like: year-month-day--hourMinuteSecond, eg. 12-05-01--153012

is there a change to get this working with an bat-file or anything like that? i tried the exifdropper und exiftoolgui already, but wasn´t succesful.

i´m sorry about my bad english.


thanks,
michael
Title: Re: MOV files rename with creation date
Post by: Phil Harvey on June 10, 2012, 06:32:15 AM
Hi Michael,

With exiftool installed for command-line use (https://exiftool.org/install.html#Windows), you can do this by creating a .BAT file containing this command:

exiftool -d "%%y-%%m-%%d--%%H%%M%%S" "-filename<createdate" -k %*

Then drag and drop your files and/or folders containing your files onto the .BAT file to rename the files.

The -k option keeps the exiftool window from disappearing when the command is done. 

Note that this will only work if the files contain a CreateDate tag.  If they don't, use exiftool -s -time:all FILE to see what date/time tags are available, and use one of these instead.

- Phil
Title: Re: MOV files rename with creation date
Post by: MichiMuc on June 10, 2012, 08:06:36 AM
Great! Thanks!

only one problem, i have to modify the time, because the time-stamp of the original is in GMT and at berlin we have GMT+2 or +1.

Is there a chance?

Title: Re: MOV files rename with creation date
Post by: MichiMuc on June 10, 2012, 08:10:06 AM
and one more problem. the extension ".mov" gets lost.

e.g. "abcde.mov" becomes "12-06-09--155938" (but without .mov)
Title: Re: MOV files rename with creation date
Post by: Phil Harvey on June 10, 2012, 07:52:01 PM
Oops, right.  Add .%%%%e to the end of the format string to include the file extension.

And you can set the QuickTimeUTC flag in a config file (https://exiftool.org/config.html) to force the QuickTime time tags to be converted from UTC:

# Specify default ExifTool option values
%Image::ExifTool::UserDefined::Options = (
    QuickTimeUTC => 1,  # assume QuickTime date/time values are in UTC
);


- Phil
Title: Re: MOV files rename with creation date
Post by: MichiMuc on June 12, 2012, 01:56:44 AM
thanks...

it works! great!
Title: Re: MOV files rename with creation date
Post by: Southdakotaguy on June 17, 2012, 08:13:54 AM
Great topic! It also solved my similar problem ...
Title: Re: MOV files rename with creation date
Post by: MichiMuc on October 06, 2012, 04:46:07 AM
Hi Phil,

would be great if you could help another time. I use your script for my *.mov- and *.jpg-files.

Now there is a problem if there are 2 or more jpg´s created at the same time because the file name is used already. Do you think there is a possibility to add an "-1" or something like that in this cases?

And is it possible that only *.mov- and *.jpg-files are renamed and no others (e.g. *.ini)?

Thanks,
Michael
Title: Re: MOV files rename with creation date
Post by: Phil Harvey on October 06, 2012, 04:49:03 PM
Hi Michael,

Add %-c to the output file name to add a copy number with a leading dash if the file already exists.

Add -ext mov -ext jpg to the command to get exiftool to only process these types of files.

- Phil
Title: Re: MOV files rename with creation date
Post by: MichiMuc on October 06, 2012, 06:53:47 PM
Thank you... Works!  :D