Capture Date

Discussion in 'Digital Photography' started by Robert Peirce, May 31, 2010.

  1. 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"\
    *
     
    Robert Peirce, May 31, 2010
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Aim High

    No time date stamp analog capture

    Aim High, Sep 20, 2004, in forum: Computer Support
    Replies:
    5
    Views:
    989
    =?ISO-8859-1?Q?R=F4g=EAr?=
    Sep 20, 2004
  2. Replies:
    4
    Views:
    3,253
  3. Alex Hunsley

    software to set file modified date to exif photo taken date?

    Alex Hunsley, May 20, 2004, in forum: Digital Photography
    Replies:
    2
    Views:
    9,496
    David J Taylor
    May 20, 2004
  4. One-Shot Scot
    Replies:
    3
    Views:
    843
    Robert Morgan
    May 23, 2004
  5. hely0123
    Replies:
    0
    Views:
    2,146
    hely0123
    Oct 30, 2007
Loading...

Share This Page