How to keep value of FILE:FileCreateDate?

Started by Jom, October 15, 2019, 09:42:57 PM

Previous topic - Next topic

Jom

Hello.

If I execute this command,
exiftool -progress: -progress -overwrite_original -r "-EXIF:DateTimeOriginal<FILE:FileCreateDate" -EXIF:OffsetTimeOriginal="+03:00" *
I lose the original value of FILE:FileCreateDate and get the updated one.

How to keep value of FILE:FileCreateDate?

Thanks.

StarGeek

FileCreateDate should not be changed under Windows, though FileModifyDate will.  I don't know why it's happening in your case.  But try using the -overwrite_original_in_place option.
* 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).

Jom

QuoteFileCreateDate should not be changed under Windows, though FileModifyDate will.  I don't know why it's happening in your case.

This is because ExifTool actually creates a new file and only then reads FILE:FileCreateDate from it to copy this data to the EXIF:DateTimeOriginal tag.
I think so.

Jom

Quote from: StarGeek on October 15, 2019, 09:50:12 PM
But try using the -overwrite_original_in_place option.

No effect.

-P (-preserve) — that doesn't fit either.
QuoteNote that some filesystems store a creation date (Windows FileCreateDate or Mac MDItemFSCreationDate) which is not affected by this option.

Phil Harvey

#4
I assume you're running Windows.  Here is what I get under Windows 10:



- Phil

Edit:  Changed commands to use FileCreateDate instead of FileModifyDate
...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 ($).

Jom

Yes, it Windows 10.
These are screen shots by Lightshot that do not have EXIF data about the date and time of shooting.



I can't use FileModifyDate because It is different from FileCreateDate in some files.



I need to save exactly FILE:FileCreateDate in EXIF:DateTimeOriginal.

Phil Harvey

Sorry, I used FileModifyDate instead of FileCreateDate in my last post.  I've edited the post to fix this now.  The result is the same.
...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 ($).

StarGeek

What file system is being used on the drive (NTFS, FAT)?

What is the output of
exiftool -ver -v
* 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).

Jom

Quote from: StarGeek on October 16, 2019, 12:36:30 PM
What file system is being used on the drive (NTFS, FAT)?

What is the output of
exiftool -ver -v

NTFS


StarGeek

Is the file on a local drive or a network drive?

Any background service running that might be touching the files will exiftool is running, such as an automatic backup program?

Other than that, I'm out of ideas.
* 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).

Jom

Quote from: StarGeek on October 16, 2019, 01:34:06 PM
Is the file on a local drive or a network drive?

Any background service running that might be touching the files will exiftool is running, such as an automatic backup program?

Local drive.
There are no such background services.

exiftool -progress: -progress -r -P "-EXIF:DateTimeOriginal<FILE:FileCreateDate" "-EXIF:OffsetTimeOriginal<FILE:FileCreateDate" *.png

It works, but I have questions. I'm to doing research...

StarGeek

In case you didn't know, wildcards don't work with the-r (recurse) option.  If you want to recurse and limit the scope to a specific file type, use the -ext (extension) option.

Your command should be (using the dot to indicate the current directory)
exiftool -progress: -progress -r -P "-EXIF:DateTimeOriginal<FILE:FileCreateDate" "-EXIF:OffsetTimeOriginal<FILE:FileCreateDate" -ext png .
* 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).

Jom

wildcards = *.png?
You mean r (recurse) option doesn't work with *.png, but it works with the -ext png .?

Phil Harvey

Yes.

Just think about it:  If you specify *.png, then you aren't specifying any directory names, so there is nothing to recurse into.

- 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 ($).

Jom

Thanks, I just wanted to eliminate the assumption that files will recursively search in the root automatically.