FileCreateDate from FileModifyDate

Started by Bronimus, March 28, 2020, 06:24:41 AM

Previous topic - Next topic

Bronimus

Hello,
I am a complete newbie to ExifTool and need some professional help.
Rotating some jpg-images with IrfanViewer I forgot to keep in mind the EXIF-data Informations. As consequence the informations in the EXIF-data were lost. The system "FileCreateDate" was set with the actual date, whereas the system "FileModifyDate" still holds the correct date. Now I want to use the system "FileModifyDate" as "DateTimeOriginal" and "CreateDate" in the EXIF-data, the other EXIF-data is not so important for me. The images are taken with a small Panasonic camera.
Can you please help me to achieve this? (Sorry for my english ;) )
Many thanks in advance
Kind regards
Bronimus
______________________
Windows 10 Home 64 Bit

Phil Harvey

Hi Bronimus,

Try this:

exiftool "-alldates<filemodifydate" -P DIR

The AllDates tag is a shortcut for DateTimeOriginal, CreateDate and ModifyDate.

I added the -P to preserve FileModifyDate since we are editing the file but probably want to keep the original FileModifyDate.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Bronimus

Hi Phil,
thx for your quick answer.
I tried as you suggested but with no success.
I guess there is no Exif-Block at all, so I should have to create one first?
Kind regards
Bronimus

Phil Harvey

The command is successful if you got a message that a file was updated.

It will create an EXIF block if it didn't exist.

The only reason the command would fail is if there was some error writing the file.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Bronimus

Yes it works, I missed a blank after -P
Now I get the message that the files are updated and the old files get the extension jpg_original
Thx a lot for your kind help
Kind regards
Bronimus

StarGeek

Quote from: Bronimus on March 28, 2020, 11:40:27 AM
Now I get the message that the files are updated and the old files get the extension jpg_original

Once you are sure things are working correctly, you can add the -Overwrite_Original option to suppress the creation of backup files.
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

Bronimus

@StarGeek: thx for the addition

@Phil: what a tremendous app, congratulation :) I think I have a lot to study