Copying EXIF 'date taken' to Windows file name

Started Mar 25, 2013 | Questions
Paul Barrett
Regular MemberPosts: 103
Like?
Copying EXIF 'date taken' to Windows file name
Mar 25, 2013

I have several hundred images which have been copied onto my PC and acquired the same file date. I need to restpre this to 'date taken' from the exif data. I read somewhere that irfanview might d this but I can't see the option in the copy I just downloaded.

All advice gratefully received, either on irfanview or any alternative batch method

ANSWER:
Shalom2006
Regular MemberPosts: 260Gear list
Like?
Re: Copying EXIF 'date taken' to Windows file name
In reply to Paul Barrett, Mar 25, 2013

Not sure if this helps?

http://graphicssoft.about.com/cs/renamers/ht/acdsee5rename.htm

-- hide signature --

Best Regards
Steven
Chigwell, UK

 Shalom2006's gear list:Shalom2006's gear list
Canon EOS 5D Canon EF 24-105mm f/4L IS USM Canon EF 70-300mm f/4-5.6 IS USM
Reply   Reply with quote   Complain
rio911
Contributing MemberPosts: 914Gear list
Like?
Re: Copying EXIF 'date taken' to Windows file name
In reply to Paul Barrett, Mar 25, 2013
 rio911's gear list:rio911's gear list
Sony RX100 Sony SLT-A77 Sony 50mm F1.4 Sony 70-300mm F4.5-5.6 G SSM Sony DT 16-50mm F2.8 SSM
Reply   Reply with quote   Complain
malch
Forum ProPosts: 10,564
Like?
Re: Copying EXIF 'date taken' to Windows file name
In reply to Paul Barrett, Mar 25, 2013

Paul Barrett wrote:

All advice gratefully received, either on irfanview or any alternative batch method

If you're willing to install Perl and the Image:Exiftool module, you can use a script something like this:

http://www.malch.com/nikon/perl.txt

Reply   Reply with quote   Complain
CAcreeks
Senior MemberPosts: 6,386
Like?
Re: Copying EXIF 'date taken' to Windows file name
In reply to Paul Barrett, Mar 25, 2013

Paul Barrett wrote:

I have several hundred images which have been copied onto my PC and acquired the same file date. I need to restore this to 'date taken' from the exif data. I read somewhere that Irfanview might do this but I can't see the option in the copy I just downloaded.

Yes Irfanview can do this. It is a bit complicated.

  1. Select menu File > Batch Conversion/Rename.
  2. Click radio button Batch Rename.
  3. Under Batch Rename Settings, click Options.
  4. In the Name Pattern box, type $E36867-# (see below).
  5. Possibly change other settings and click OK.
  6. In Output Directory for Result Files, select a folder.
  7. On the right side, select files to rename.
  8. On lower left, click Start Batch.

The $E means EXIF tags. Number 36867 designates date and time of the original. The -# adds sequence 1-9  in case date and time are identical.

Reply   Reply with quote   Complain
malch
Forum ProPosts: 10,564
Like?
Re: Copying EXIF 'date taken' to Windows file name
In reply to rio911, Mar 25, 2013

rio911 wrote:

I think this will be more useful:

https://irfanview-forum.de/showthread.php?t=5147&highlight=exif+rename

I think the OP wants to set the file created/modified timestamps to the date/time the image was captured. That's very different from embedding the date/time of capture in the file name.

Reply   Reply with quote   Complain
Paul Barrett
Regular MemberPosts: 103
Like?
Re: Copying EXIF 'date taken' to Windows file name
In reply to CAcreeks, Mar 26, 2013

CAcreeks wrote:

Paul Barrett wrote:

I have several hundred images which have been copied onto my PC and acquired the same file date. I need to restore this to 'date taken' from the exif data. I read somewhere that Irfanview might do this but I can't see the option in the copy I just downloaded.

Yes Irfanview can do this. It is a bit complicated.

  1. Select menu File > Batch Conversion/Rename.
  2. Click radio button Batch Rename.
  3. Under Batch Rename Settings, click Options.
  4. In the Name Pattern box, type $E36867-# (see below).
  5. Possibly change other settings and click OK.
  6. In Output Directory for Result Files, select a folder.
  7. On the right side, select files to rename.
  8. On lower left, click Start Batch.

The $E means EXIF tags. Number 36867 designates date and time of the original. The -# adds sequence 1-9 in case date and time are identical.

Thanks for the advice CAcreeks but, having tried that out it, it does not do what I want.  The most likely reason is operator error (usually is with me!).

I think I have followed your instructions correctly:

But the results I get are not as expected.  What I wanted was the date taken to be substituted for the windows file date and time.  What I got was the fields renamed with a sequential number and an unchanged windows file date and time stamp:

So, 'close but no cigar.'  Any further ideas pls?

Reply   Reply with quote   Complain
Paul Barrett
Regular MemberPosts: 103
Like?
Re: Copying EXIF 'date taken' to Windows file name
In reply to malch, Mar 26, 2013

malch wrote:

rio911 wrote:

I think this will be more useful:

https://irfanview-forum.de/showthread.php?t=5147&highlight=exif+rename

I think the OP wants to set the file created/modified timestamps to the date/time the image was captured. That's very different from embedding the date/time of capture in the file name.

Correct.  But you know what?  I'll do what rio911 suggested if there's no way to do what I want.  

OP

Reply   Reply with quote   Complain
malch
Forum ProPosts: 10,564
Like?
Re: Copying EXIF 'date taken' to Windows file name
In reply to Paul Barrett, Mar 26, 2013

Paul Barrett wrote:

Correct. But you know what? I'll do what rio911 suggested if there's no way to do what I want.

It can certainly be done. How many images do you have and how big are they?

I'd be happy to do it for you if you can get them to me on-line or even via snail mail.

Reply   Reply with quote   Complain
rio911
Contributing MemberPosts: 914Gear list
Like?
Re: Copying EXIF 'date taken' to Windows file name
In reply to Paul Barrett, Mar 26, 2013

Paul Barrett wrote:

malch wrote:

I think the OP wants to set the file created/modified timestamps to the date/time the image was captured. That's very different from embedding the date/time of capture in the file name.

Correct. But you know what? I'll do what rio911 suggested if there's no way to do what I want.

OP

Oooops,

sorry guys, I did not read the question like that.

My question is why do you need it?  Sorting the files? Getting the date and time in the file name will achieve a similar sorting ability.

Good luck,

rio

 rio911's gear list:rio911's gear list
Sony RX100 Sony SLT-A77 Sony 50mm F1.4 Sony 70-300mm F4.5-5.6 G SSM Sony DT 16-50mm F2.8 SSM
Reply   Reply with quote   Complain
Heinrich Schulz
Regular MemberPosts: 135
Like?
Re: Copying EXIF 'date taken' to Windows file name
In reply to Paul Barrett, Mar 26, 2013

Based on your file output it seems as if 1) there might not be EXIF info in the files, or 2) the EXIF is not read for some reason.

1) Try to see if the EXIF date actually exist in the files (you can view it in Irfanview from the Image Menu->Information->Exif Info button-> DateTimeOriginal field)

Viewing EXIF info in Irfanview

, or

2a) make sure you use the latest version of Irfanview with all the EXIF related plugins installed (EXIF plugin is required!),

2b) make sure you use the exact correct name pattern without any spaces or special characters (see the irfanview help file for specific details - HELP button on the batch rename settings dialog window). I use the pattern $E36867_$E272_$F to rename to the Original date ($E36867) and Camera model name ($E272) and original file name with extension ($F) - and using the "Replace text" option to replace the : from the date format with _ underscores. It works perfectly every time.

My Irfanview batch rename settings

You can also use the "run test rename" option to see what the output for your selection might look like.

I suspect your problem might be related to not having the EXIF plugin installed in Irfanview...

selected answer This post was selected as the answer by the original poster.
Reply   Reply with quote   Complain
Paul Barrett
Regular MemberPosts: 103
Like?
Re: Copying EXIF 'date taken' to Windows file name
In reply to Heinrich Schulz, Mar 26, 2013

That was the problem - no EXIF plugin.  Works a treat now.  Thanks.

Actually this has got me to a position that I did not anticipate.  It has put the date and time stamp into the file name not the file data and time attributes.  But that's actually better because it has allowed me to merge photos from 2 cameras with different naming conventionsinto one chronological stream

Reply   Reply with quote   Complain
AxelR
Senior MemberPosts: 1,027
Like?
Re: Copying EXIF 'date taken' to Windows file name
In reply to malch, Mar 27, 2013

malch wrote:

I think the OP wants to set the file created/modified timestamps to the date/time the image was captured. That's very different from embedding the date/time of capture in the file name.

Exactly, and you just gave me a feature idea for next weekend 

-- hide signature --
Reply   Reply with quote   Complain
malch
Forum ProPosts: 10,564
Like?
Re: Copying EXIF 'date taken' to Windows file name
In reply to AxelR, Mar 27, 2013

AxelR wrote:

malch wrote:

I think the OP wants to set the file created/modified timestamps to the date/time the image was captured. That's very different from embedding the date/time of capture in the file name.

Exactly, and you just gave me a feature idea for next weekend 

Have fun with Time Zones, Daylight Savings and those horrible FAT/NTFS inconsistencies

The fact that EXIF doesn't make any TZ provision won't help either

Reply   Reply with quote   Complain
AxelR
Senior MemberPosts: 1,027
Like?
Re: Copying EXIF 'date taken' to Windows file name
In reply to malch, Mar 27, 2013

malch wrote:

AxelR wrote:

malch wrote:

I think the OP wants to set the file created/modified timestamps to the date/time the image was captured. That's very different from embedding the date/time of capture in the file name.

Exactly, and you just gave me a feature idea for next weekend 

Have fun with Time Zones, Daylight Savings and those horrible FAT/NTFS inconsistencies

The fact that EXIF doesn't make any TZ provision won't help either

Thanks

Most users probably set their camera to the current wall clock time wherever they are, and manually adjust for DST so there is indeed no way for a program to be sure.

Still, an imperfect solution is better than "Jan-1-80" or some other arbitrary time and I think I can do something about this in the form of a batch-processing action that will do exactly what the OP hopes for, in a simple manner.

It could be done today in a crude way from a Custom Script action in FPV, with a couple-of-lines script using the Shell object ("Shell.Application"), but scripting is an advanced topic and the time-zones issues you mentioned would either need to be ignored, or handled explicitly by the script.

-- hide signature --
Reply   Reply with quote   Complain
malch
Forum ProPosts: 10,564
Like?
Re: Copying EXIF 'date taken' to Windows file name
In reply to AxelR, Mar 27, 2013

AxelR wrote:

Still, an imperfect solution is better than "Jan-1-80" or some other arbitrary time and I think I can do something about this in the form of a batch-processing action that will do exactly what the OP hopes for, in a simple manner.

Yes, I think that would be useful.

It's pretty much impossible to handle the TZ/Daylight Savings issues fully automatically and correctly. I'm inclined to think that can be addressed quite simply by allowing the user to specify an offset (assuming the EXIF is simply localtime).

Reply   Reply with quote   Complain
Sean Nelson
Forum ProPosts: 10,263
Like?
Re: Copying EXIF 'date taken' to Windows file name
In reply to malch, Mar 27, 2013

malch wrote:

AxelR wrote:

malch wrote:

I think the OP wants to set the file created/modified timestamps to the date/time the image was captured. That's very different from embedding the date/time of capture in the file name.

Exactly, and you just gave me a feature idea for next weekend 

Have fun with Time Zones, Daylight Savings and those horrible FAT/NTFS inconsistencies

The fact that EXIF doesn't make any TZ provision won't help either

If you were very clever, you could assume that the camera was always set to the local time zone and use GPS data and a daylight savings time algorithm to look up the time zone and calculate the UTC time... 

Reply   Reply with quote   Complain
CAcreeks
Senior MemberPosts: 6,386
Like?
Re: Copying EXIF 'date taken' to Windows file name
In reply to Paul Barrett, Apr 1, 2013

Paul Barrett wrote:

That was the problem - no EXIF plugin.  Works a treat now. Thanks.

Yay! Glad you got it working.

(Just returned from a trip, catching up.)

Reply   Reply with quote   Complain
Keyboard shortcuts:
FForum MMy threads