How to copy internal EXIF creation date -> windows creation/last modified date?

Started by pstein, May 09, 2010, 12:33:19 PM

Previous topic - Next topic

pstein

Due to a mistake I changed accidentially all the Windows (!) last modified (and creation) dates of many photos from a certain folder. Is there a way to reset these external dates/times to the (still existing) internal EXIF creation date? In other words: Copy the internal creation date to the external win file date attributes?

How can I achieve this in a bulk operation?

Peter

Phil Harvey

This will set the file modification date/time.  ExifTool can't write the creation date/time.

exiftool "-filemodifydate<datetimeoriginal" DIR

Where DIR is the name of a directory containing the images.

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

BogdanH

Hi,
If you're more familiar with GUI, there you can:
1. select all files in particular folder,
2. In menu "Modify" choose "FileModifyDate as in Exif:DateTimeOriginal.."
-which does the same as Phil suggested.

Anyway, if you have really a lot of files there (say, several hundreds), then Phil's solution might be better/faster.

Bogdan

RAD

not working
------------------------------------------------------------------------------
Microsoft Windows [6.0.6002]
C:\Users\RAD>exiftool "-filemodifydate<datetimeoriginal" C:\RAD\FotoVideoLog\b\b
009.jpg
Warning: Cannot handle date (00, 00, 12, 01, 5, 2056) in File:FileModifyDate (Va
lueConvInv) - C:/RAD/FotoVideoLog/b/b009.jpg
    0 image files updated
    1 image files unchanged
-------------------------------------------------------------------------------

Phil Harvey

The problem is that your dateTimeOriginal is out of range.  You can't have a FileModifyDate in 1956 on most filesystems.

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

BogdanH

Thank you for helping in GUI section, Phil.

I'm daily visiting this forum, but have still somehow missed RAD's post.

Greetings,
Bogdan

jbmcsorley

I'm running into the same problem.  The following article suggests that the limitation (at least on a Windows system) has to do with how the hard drive is formatted.  FAT and FAT32 only allow dates from 1/1/1980.  I'm going to put an old hard drive in my system and format it with NTFS to see if that works (presumably, allowing dates to go back as far as 1752).   http://articles.techrepublic.com.com/5100-10878_11-5034280.html.   I'll let you know how it goes.

Phil Harvey

I think you will encounter a limit of 1970 due to the date/time functions that ExifTool uses.

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

jbmcsorley

Agreed... thanks for the follow-up. It turns out that I'm already running NTFS.  I'll just move the EXIF date(s) to the filename and use that for sorting.  Not ideal, but readily portable.  Thanks again.