* READONLY * FileCreateDate ?

Started by HiTechHiTouch, August 05, 2012, 11:19:02 AM

Previous topic - Next topic

HiTechHiTouch

I've discovered all the problems setting the file system file creation date, and this isn't about doing that.

This is going the other way, i.e. setting a tag to information obtained from the file system.

For example, I need exif's created for some files and populated.

  -ExifTool -Exif:DateTimeOriginal<FileCreateDate -Exif:ImageDescription<FileName . . .

Is the file system create date available to generic Perl?

Thanks!

Thanks!

Phil Harvey

No, sorry.  Unix file systems (UFS) do not store the file creation date, and as a result there is no standard Perl routine to read/write this.

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

merrickw

Hi Phil,

I just started using your ExifTool and it's hard to believe how many formats you cover. 
But, as Murphy's law would have it, the final bit I need is not there.  All I'm trying to do is set all dates = to the original date taken, but I need the Windows FileCreateDate to be included in that.  Is there any chance this can be accomplished?

I was using a tool called AttibuteMagic Pro which can set all the dates from the Original Date Taken, but it only works on .jpg.  I need jpg mp4 and mov, which you've got covered.

Thanks again for a terrific tool.

Regards,
Merrick

Phil Harvey

#3
Hi Merrick,

The file creation date can not be set through the standard Perl library, which is why ExifTool can't yet write this.  I may be able to read this value for some filesystems using standard Perl calls, but I haven't looked into this in detail.  I didn't think there was much point to adding it read-only, but maybe there is since it would be useful to you.  I'll look into this.

- Phil

Edit:  Readonly.  Right.  How did I miss that?
...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 ($).

Phil Harvey

I did some tests and the inode change time (readable, but not writable, by standard library functions) in Windows is the file creation date.  I will add the ability to read this in Windows to ExifTool 9.07.  This will not work for Mac or Linux.

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

merrickw

Hi - I actually need to be able to set FileCreateDate to DateTimeOriginal (or CreateDate for movie files). 

My goal is to have all dates associated with the jpg/mp4/mov set to one single date, the DateTimeOriginal.  That way my other cataloging programs won't get confused on how to sort these files.

Thanks for looking into this.

Regards,
Merrick

PS - as a side question, if I use "-filemodifydate<createdate", what happens if there are multiple CreateDates?  ie, my MOV has:
[EXIF:ExifIFD]  CreateDate                      : 2012:10:07 14:40:14
[QuickTime]     CreateDate                      : 2012:10:07 18:40:14


Phil Harvey

Quote from: merrickw on November 20, 2012, 09:51:05 AM
Hi - I actually need to be able to set FileCreateDate to DateTimeOriginal (or CreateDate for movie files). 

OK.  Making this writable can certainly not be accomplished with the standard libarary.  But I'll see what I can do.

QuotePS - as a side question, if I use "-filemodifydate<createdate", what happens if there are multiple CreateDates?  ie, my MOV has:
[EXIF:ExifIFD]  CreateDate                      : 2012:10:07 14:40:14
[QuickTime]     CreateDate                      : 2012:10:07 18:40:14

It will use the date/time you see without the -a option.

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

merrickw

I see.  It turns out the [QuickTime] CreateDate survives in my case.


Phil Harvey

I've found a module I can use that works for reading and writing the filesystem creation date in Windows, and will add this in ExifTool 9.07.  I've looked for a similar solution for the Mac, but haven't found anything yet.  There was a module that did this for older OS X versions, but I tried it and it doesn't work for the current OS X.

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

merrickw

Excellent - thank's so much.  I don't know why anyone would use a Mac anyway.

merrickw

Hi - so I downloaded 9.07, but I can't figure out what tag to use to read/write FileCreateDate.  I was using -time:all to read but I don't see the new field in that shortcut.

Also - I've been using:
exiftool "-filemodifydate<datetimeoriginal"

and that was setting both the modify and access date.  I was hoping there would be one command to set all three from datetimeoriginal.

Phil Harvey

What tags to you see with exiftool -a -G1 -s -time:all 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 ($).

merrickw

[System]        FileModifyDate                  : 2012:11:25 18:05:32-05:00
[System]        FileAccessDate                  : 2012:11:25 18:05:32-05:00
[IFD0]          ModifyDate                      : 2012:11:23 14:30:19
[ExifIFD]       DateTimeOriginal                : 2012:11:23 14:30:19
[ExifIFD]       CreateDate                      : 2012:11:23 14:30:19


I was hoping to see a [System] FileCreateDate ...

Phil Harvey

This is unfortunate.  I'm assuming that you're running Windows 7?  I tested this on 2 Windows XP systems and it worked.  It would be unfortunate if it doesn't work on Windows 7.  I'll see if I can test this.  If this isn't portable across different Windows versions I may just have to retract this feature. :(

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

merrickw

#14
Windows XP.  I can test in Win 7 as well.

Update:  Same result from Win7 as I got from WinXP

Update2: I'm an idiot.  When I extracted the new version of exiftool, I forgot that I also copied the exe to remove the -k.  So I was running the old version.

Now I get all 6 dates:

======== G:/My Documents/My Pictures/2011-10-07/temp/IMG_3531.JPG
[System]        FileModifyDate                  : 2012:11:25 18:05:32-05:00
[System]        FileAccessDate                  : 2012:11:25 18:05:32-05:00
[System]        FileCreateDate                  : 2012:11:25 18:05:32-05:00
[IFD0]          ModifyDate                      : 2012:11:23 14:30:19
[ExifIFD]       DateTimeOriginal                : 2012:11:23 14:30:19
[ExifIFD]       CreateDate                      : 2012:11:23 14:30:19

Is there one command to modify all three system dates at once? 
ie (allsystemdates)<DateTimeOriginal ?

Thanks again.

Update3: Win7 gives same results.