Author Topic: Jfif tags to Exif (Windows Readable) Date Take info  (Read 2865 times)

Winston

  • Jr. Member
  • **
  • Posts: 15
Jfif tags to Exif (Windows Readable) Date Take info
« on: June 11, 2014, 07:20:12 AM »
I am a complete greenhorn. So before I try to do anything I would like to see if the below scenario is possible.

I have a few thousand photos that have a JFIF tag like this:(I have attached one of the files)
ÿØÿà__JFIF__________ÿþ_ÔDATE=05/30/2014
TIME=06:47:09
TEMP=65F
TEXT1= #3 Tyler Tall
TEXT2=By Small Pond
TRIGGER=PIR
CAMERA=BuckEyeCamII
FVER=135
SN=R015P1
A=1.00
T=37.9
LIGHT=474
EV=82
PIR=89
DELAY=120
MOON=0.034
I=2844/114 3953/84

And I would like to take the date and time stamp (see attached file) and add it to the same file in a format that Windows can read it  so I can use it to sort by in Windows Explorer. And if possible I would like to add the other info as a keyword or tag.

It is time consuming to do it manually. :P
Thanks

Phil Harvey

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 16885
    • ExifTool Home Page
Re: Jfif tags to Exif (Windows Readable) Date Take info
« Reply #1 on: June 11, 2014, 10:27:40 AM »
The information you are talking about is buried in the JPEG comment:

Code: [Select]
> exiftool ~/Desktop/cool\ pic.jpg -comment
Comment                         : DATE=05/30/2014.TIME=06:47:09.TEMP=65.F.TEXT1= #3 Tyler Tall.TEXT2=By Small Pond.TRIGGER=PIR.CAMERA=BuckEyeCamII.FVER=135.SN=R015P1.A=1.00.T=37.9.LIGHT=474.EV=82.PIR=89.DELAY=120.MOON=0.034.I=2844/114 3953/84 .

Copying the date to some other tag is possible, but some heavy-duty reformatting would be required:

exiftool "-createdate<${comment;s[.*DATE=(\d+)/(\d+)/(\d+).*][$3:$1:$2 00:00:00]}" DIR

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

This command will write the EXIF CreateDate.  I am not sure what you want to write so that Windows will see it. See FAQ 3 for help with this.

To also add all of the parameters as keywords in the same command, you could do this:

exiftool "-createdate<${comment;s[.*DATE=(\d+)/(\d+)/(\d+).*][$3:$1:$2 00:00:00]}" "-keywords<comment" -sep " " DIR

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Winston

  • Jr. Member
  • **
  • Posts: 15
Re: Jfif tags to Exif (Windows Readable) Date Take info
« Reply #2 on: June 11, 2014, 12:52:12 PM »
I am getting this error.

Phil Harvey

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 16885
    • ExifTool Home Page
Re: Jfif tags to Exif (Windows Readable) Date Take info
« Reply #3 on: June 11, 2014, 12:53:38 PM »
You need quotes around your directory name since it contains spaces.

Otherwise, the individual words in the name are interpreted as separate arguments.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Winston

  • Jr. Member
  • **
  • Posts: 15
Re: Jfif tags to Exif (Windows Readable) Date Take info
« Reply #4 on: June 11, 2014, 01:23:07 PM »
Thanks. It changed the date and put the keywords in but it did not change the time taken.

Phil Harvey

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 16885
    • ExifTool Home Page
Re: Jfif tags to Exif (Windows Readable) Date Take info
« Reply #5 on: June 11, 2014, 01:39:48 PM »
Right.  I wasn't parsing the time.  Try this:

exiftool "-createdate<${comment;s[.*DATE=(\d+)/(\d+)/(\d+).*TIME=(\d+):(\d+):(\d+).*][$3:$1:$2 $4:$5:$6]s}" "-keywords<comment" -sep " " DIR

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Winston

  • Jr. Member
  • **
  • Posts: 15
Re: Jfif tags to Exif (Windows Readable) Date Take info
« Reply #6 on: June 11, 2014, 02:23:22 PM »
Thank you very much you have save me HOURS! ;D