PC Review


Reply
Thread Tools Rate Thread

Capture Date

 
 
Robert Peirce
Guest
Posts: n/a
 
      31st May 2010
Tifs from scans and possibly other images don't show a capture date,
which is the common way I keep track of things.

I store my images by date in a directory tree -- yyyy/mm/dd/image and I
want the capture date to exist and to match the directory. That's fine
with jpg and various RAW formats but not for tifs. To get around this I
created a shell script, which Mac, Unix and Linux users can probably use
directly and Windows users with a little fiddling, to call exiftool with
the correct argument. This script changes all the files in a directory.

#!/bin/ksh
# spdf -- set Photo Date for entire directory

if [[ $# -ne 3 ]]
then
print usage: spdf Year Month Day
exit
fi

Year=$1
Month=$2
Day=$3

while (("$Year" < 1977)) # The earliest year in my library
do
printf "Year (YYYY) = "
read Year
done
while (("$Month" > 12 || "$Month" < 1))
do
printf "Month (MM) = "
read Month
done
case $Month in
02) while (("$Day" > 29 || "$Day" < 1))
do
printf "Day (DD) = "
read Day
done;;
01|03|05|07|08|10|12)
while (("$Day" > 31 || "$Day" < 1))
do
printf "Day (DD) = "
read Day
done;;
04|06|09|11)
while (("$Day" > 30 || "$Day" < 1))
do
printf "Day (DD) = "
read Day
done;;
esac

string=$(printf "%4s:%2s:%2s 12:00:00\n" $Year $Month $Day)

exiftool -overwrite_original\
-DateTimeOriginal="$string"\
*
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Capture Name and Date =?Utf-8?B?S2V2aW43Ng==?= Microsoft Access 13 10th Oct 2006 10:06 PM
How do I capture just the date from date/time field in an SQL Dat =?Utf-8?B?ZWh1ZHNvbg==?= Microsoft Access VBA Modules 1 16th Feb 2006 02:14 PM
How do I capture just the date from date/time field in an SQL Dat. =?Utf-8?B?ZWh1ZHNvbg==?= Microsoft Access Queries 1 15th Feb 2006 04:14 PM
want to capture date elegantpartner Microsoft Excel Misc 1 9th Jan 2006 04:20 AM
Capture of First Use Date Tony Uythoven Microsoft Access Forms 5 15th Feb 2005 11:19 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:55 PM.