Hi!
At the moment I execute both of this commands in each folder to rename jpg and mov files. Is there a way to work more efficient and combine the commands to one? (Mac osx)
exiftool -ext JPG '-FileName<CreateDate' -d "%a %d %b %Y %H.%M%%-c.%%le" .
exiftool -ext MOV '-FileName<FileModifyDate' -d "%a %d %b %Y %H.%M%%-c.%%le" .
Thanks! :)
This is easier than people seem to think. Here is the combined command:
exiftool -ext JPG -ext MOV '-FileName<FileModifyDate' '-FileName<CreateDate' -d "%a %d %b %Y %H.%M%%-c.%%le" .
The only trick is the order of the FileName arguments. The last valid assignment takes precedence, so you want to copy CreateDate last since you want it to override FileModifyDate if available.
- Phil
Thanks for the quick answer!
But.. ;) it doesn´t seem to solve my problem. The reason I use FileModifyDate on MOV files is that the existing exif data for CreateDate is wrong, so I need to use CreateDate for JPG and FileModifyDate for MOV, to get everything correct.
I tried your solution but it picks CreateDate for both JPG and MOV (as you explained "- The last valid assignment takes precedence"). I can live happily with executing exiftool twice per folder, but it would be cool if it's possible to combine them to one.
/ L
Maybe :
exiftool -ext JPG '-FileName<CreateDate' -execute -ext MOV '-FileName<FileModifyDate' -common_args -d "%a %d %b %Y %H.%M%%-c.%%le" .
Thanks Orax. That is exactly what I would have suggested.
- Phil
Thanks orax,
That command works perfect! :D
/ L