[Originally posted by anguilla on 2009-10-20 13:45:56-07]
Hello
I am just back from a trip to Africa and forgot to set dates on my Nikon. (Yes I know I am a dumba$$). I have over 9000 RAW images on an external hard drive that need to have 7 hours added to the dates.
Is running the command below what I want to use?
exiftool -AllDates+=7 -if $make eq "Nikon" dir
How do I tell it to limit it to the external drive images? Or to a specific folder of images?
Mary
[Originally posted by exiftool on 2009-10-20 14:46:38-07]Hi Mary,
Hope you had a good trip. Your command is close, but your quotes
aren't quite right. If you're on Windows, the command is:
exiftool -alldates+=7 -if "$make eq 'Nikon'" DIR
But if you're on Mac or Linux you need to swap the single and double
quotes in this command.
In the command,
DIR is the name of the directory containing
the images you want to process. I suggest writing the output images
to a directory on the hard disk rather than writing them back to the
memory card. For example, if your memory card is drive "e", this
command will do all images in one of the directories of the card:
exiftool -alldates+=7 -if "$make eq 'Nikon'" -o c:\pictures e:\DCIM\100NIKON
or this will do all the images on the memory card:
exiftool -alldates+=7 -if "$make eq 'Nikon'" -o c:\pictures -r e:\
The
-o output directory ("c:\pictures" in the examples) must
already exist before your run the command.
I hope this helps.
- Phil
[Originally posted by anguilla on 2009-10-20 15:13:06-07]Thanks Phil and yes it was an unbeliveably awesome trip!
I am on a Mac and all my RAW images have been downloaded from the CF cards to folders by date on portable mini OWC 320GB external hard drive.
Am I understanding correctly that this will rewrite my images, as opposed to just changing the exif dates leaving images alone? If so, then I may have a problem since my Ext HD's a practicall full.

I am sorry but I don't understand the c:\pictures etc stuff and therefore I guess how to state the directory info for the progam. I am a Mac person and photographer so this programming stuff makes my head spin. Can you please gie me a bit more hand holding.

Mary
[Originally posted by exiftool on 2009-10-20 15:46:07-07]Hi Mary,
OK, you're on a Mac. Then the examples are slightly different.
By default, exifool will rewrite an image, leaving the original intact
with "_original" added to the file name. So since your external
disk is full, unless you already have backups I would suggest
writing the new files to a separate disk, like this:
exiftool -alldates+=7 -if '$make eq "Nikon"' -o ~/Pictures "/Volumes/EXTERNAL_DISK/IMAGE_DIR"
This command will write the new images to the "Pictures" folder in your
home directory ("~" in the command is an alias for your home directory).
You will have to change "EXTERNAL_DISK" and "IMAGE_DIR" to the
actual name of your external disk and the directory containing the
images. Once you are sure the new images are OK and the times
are all good, then you can copy them back to your external disk
if you like.
There is an option to overwrite your original images, which would
avoid the problem of requiring all this extra disk space, but I wouldn't
recommend using this option unless you already have backups of
all your images. However, if your external disk is already backed
up elsewhere, then you could do this:
exiftool -alldates+=7 -if '$make eq "Nikon"' -overwrite_original -P -v0 "/Volumes/EXTERNAL_DISK/IMAGE_DIR"
Here I have thrown in a
-P option to also preserve
the filesystem modification date for the images, and a
-v0option to print the name of the each file as it is processed.
- Phil
[Originally posted by anguilla on 2009-10-20 16:15:47-07]
Thank you for your patience Phil.
I hooked up the ext drive to my computer and tried to do the 1st command above writing the images to another external hard drive with no love. Here is my command and the reported outcome from Terminal:
exiftool -alldates+=7 -if '$make eq "Nikon"' -o /Volumes/gTechRAID_OLD/Africa 2009 pics "/Volumes/OWC - Africa Backup 1/Africa 2009 Oct"
1 directories scanned
2 files failed condition
0 image files read
My drive name with the pics on it is: OWC - Africa Backup 1
The drive and new folder I am trying to write to is: gTechRAID_OLD/Africa 2009 pics
What am I doing wrong?
Mary
[Originally posted by anguilla on 2009-10-20 17:26:03-07]
OK playing around I tried this:
exiftool -alldates+=7 -ext NEF -o '/Volumes/gTechRAID_OLD/Africa 2009 pics' '/Volumes/OWC - Africa Backup 1/Africa 2009 Oct/00 20091003 OWC1'
1 directories scanned
22 image files created
This did the trick to create the new files in the new location - BUT all the files have the current date instead of the needed + 7 hours to the original date. Hmmmmmm ..... what do I need to change in the command?
Mary
[Originally posted by exiftool on 2009-10-20 17:51:59-07]Hi Mary,
You should add the
-r option if you want exiftool to
process images in sub-directories. Otherwise it only scans
for images in the directory (folder) you specified.
If you also want the "Apple" date/time to be set, you can add
this to the command:
-filemodifydate+=7
But this won't work once the FileModifyDate has been changed.
Just to explain: The FileModifyDate is stored in the disk directory
information, not in the file itself. Normally
-alldateswill set the common EXIF date/time tags (which are stored in the
file), and set the filesystem modification date to the current time
(unless the
-P option is used, in which case the filesystem
modification date isn't changed, but this wasn't what you wanted
either.) But you can set the FileModifyDate to whatever you want
in the files you already processed. For example, the following
command will update the FileModifyDate from
the contents of an EXIF date/time tag:
exiftool -ext NEF "-filemodifydate<datetimeoriginal" "/Volumes/IMAGE_DIRECTORY"
I think you will get what you want if you apply this to the files
you already processed.
- Phil
[Originally posted by anguilla on 2009-10-20 18:46:11-07]Oh Phil you are a prince! That worked perfectly!!! Now all my dates - both exif and Apple - are the correct date/times that the pics were taken.
I am forever grateful to you and offer my heartfelt thanks!!! (I will also offer a PayPal donation and please use it for a nice dinner on me

)
Thank you so much!!!
Mary
[Originally posted by exiftool on 2009-10-20 19:26:53-07]
Great! Glad we got everything squared away.
I got the donation. Thanks!
- Phil