Exiftool not working on Win 7

Started by Archive, May 12, 2010, 08:54:41 AM

Previous topic - Next topic

Archive

[Originally posted by abramley on 2009-11-06 00:47:59-08]

Hi all,

I ran Win Vista 32bit with Exiftool and active perl very happily for a while to add the Lens ID to the XMP of my Minolta and Sony shots.  I now have a win 7 64bit desktop and unfortunately, despite copying everything from my old machine, I cannot get it to alter the files.  When I ask the bat file to run, it simply gives me the basic console of exiftool with all the help documentation.  You can find a screenshot here:

http://farm4.static.flickr.com/3575/4078679867_cd693369e7_o.jpg

In the example above I dragged the .arw onto the correct .bat.

My .bat reads as follows:

Code:
@echo off
   :begin
   if _%1_==__ goto end
   echo Processing %1...
   C:\exiftool\exiftool.pl -k -TagsFromFile %%d%%f.arw "-lensId>lens" -overwrite_original -ext XMP %1 -r
   shift
   goto begin
   :end

Which is identical to the version that worked on my old machine, the only change being the path to exiftool.pl.

Any help will be much appreciated!  When replying please bear in mind the fact that I'm a 100% newbie - the above .bat was written for me and I was hand-held through the entire process the first time around.  I know how to use a computer, but nothing at all about perl, so please be gently!

Best regards,

Adam

Archive

[Originally posted by exiftool on 2009-11-06 12:07:27-08]

Hi adam,

ExifTool will print the help if no image file names are given
on the command line.  I think this must be the problem.  Likely
somehow the %1 is not working for you.  I suggest putting
and "echo" command before the exiftool line to see exactly
what command you are attempting to execute, and comparing
this with your old system.

Code:
echo C:\exiftool\exiftool.pl -k -TagsFromFile %%d%%f.arw "-lensId>lens" -overwrite_original -ext XMP %1 -r

- Phil

Archive

[Originally posted by abramley on 2009-11-06 13:12:06-08]

Hi Phil,

Thanks for that response.  Here is the result of putting an echo where you suggested in the .bat file:

http://farm4.static.flickr.com/3631/4080563124_59e7c186b3_o.jpg

All I can confirm is that the file path is correct - I'm afraid I have no skill in perl at all.  I can follow an instruction, but that's it...

When running that time the information was still not copied.

I attempted to compare this with my old machine but the cmd line disappears without ever displaying text so I am unable to capture what happens with a screenshot.  How do I make the cmd window remain on my screen?

Thanks again for your help,

Adam

Archive

[Originally posted by exiftool on 2009-11-06 13:37:25-08]

Hi Adam,

Sorry, I totally missed the fact that you are writing an ARW image.
ExifTool currently doesn't support writing ARW (I hope to add this
support but haven't yet implemented ARW writing).

For these images you are stuck writing an XMP sidecar file for now.

BTW,  You can make the batch file pause with a "pause" command
I think (to avoid the window disappearing).

- Phil

Archive

[Originally posted by abramley on 2009-11-06 13:54:04-08]

Hi Phil, my mistake - the bat works on the XMP sidecar, not the RAW itself.  Exiftool should read the tag from the ARW and write it to the XMP sidecar - this is how the bat file worked on my Vista machine.  It still works just fine there, and my current workflow is actually to generate the XMPs on my laptop and port them over to my Win7 desktop - obviously very unwieldy.

I'm afraid I'm simply way over my head here - everything seems to be fine but nothing is working.  Exiftool detects the file, is told to read the LensID tag from the ARW and write it to the XMP.  Except it doesn't :E  Running the command with pause on my vista laptop shows no differences at at all - the only difference being that it does write the correct Lens ID to the exif.

Thanks again for your help

Archive

[Originally posted by exiftool on 2009-11-06 13:59:41-08]

OK, then I think the problem is that you are running the batch file
on the ARW image instead of the XMP sidecar.

Alternatively, it should work if you run the batch file on a folder
of images with sidecar files.

- Phil

Archive

[Originally posted by abramley on 2009-11-06 14:16:21-08]

I'm afraid I've still not managed to make it work - I've tried running the batch on the XMPs and on the folder containing RAWs and XMPs.

Here's what happens when I run the batch on my Vista machine:

www.jaggerbramley.com/good.xmp

The basic information such as the location, copyright etc was added to the XMP created upon import.  The batch file adds the aux:LensCarl Zeiss Vario-Sonnar T* 24-70mm F2.8 ZA SSM (SAL-2470Z)/aux:Lens line.  

A file run through the exact same process on my Win 7 machine comes up with the following:

www.jaggerbramley.com/bad.xmp

As you can see, the Lens string is absent - exiftool simply hasn't done its job.  Why I just can't answer!

Cheers, Adam

Archive

[Originally posted by exiftool on 2009-11-06 14:33:15-08]

Hi Adam,

You're right, it's not working.  I'm sure we can solve this,
but it may take a few iterations.

Try adding a -v option to the command in the .bat file,
then run it on your Windows 7 machine and show me the
result.  (I'm assuming you took out the "echo" from before,
right?).

- Phil

Archive

[Originally posted by abramley on 2009-11-06 14:53:32-08]

Hi Phil,

Many thanks for your patience!  The latest version of the batch file reads like this:

Code:
@echo off
   :begin
   if _%1_==__ goto end
   echo Processing %1...
   C:\exiftool\exiftool.pl -k -TagsFromFile %%d%%f.arw "-lensId>lens" -overwrite_original -ext xmp %1 -r -v
pause  
shift
   goto begin
   :end

I ran this on both the ARW and the XMP and neither was succesful - both ran exiftool and gave me the help option.

Cheers, Adam

Archive

[Originally posted by exiftool on 2009-11-06 15:19:23-08]

OK, so we're back to exiftool not getting the file name, which
is where we started. Sad

But I saw from your "echo" output that you were indeed passing
a filename to exiftool (with %1), but it was an arw file, which
was wrong.

How exactly are you running the .bat file?  Are you dropping
an image onto the icon of the .bat file?   This should work.

Try changing the exiftool command to this and see what happens:

Code:
C:\exiftool\exiftool.pl -k -echo "test1" -echo %1 -echo "test2"

This should print out three lines in the window, "test1" and "test2"
(without quotes) and the full path name of the file in between
(again, without quotes).

Is this what happens?

- Phil

Archive

[Originally posted by abramley on 2009-11-06 16:51:37-08]

I think we're getting somewhere now - I didn't get the expected result when I changed the code to that above.  My bat was as follows:

Code:
 @echo off
   :begin
   if _%1_==__ goto end
   echo Processing %1...
   C:\exiftool\exiftool.pl -k -echo "test1" -echo %1 -echo "test2"
pause  
shift
   goto begin
   :end

and once more exiftool ran with the help interface.  I usually run Exiftool through a custom button which launches the bat file externally, but during this testing I've been trying to run it by dragging both the XMP and the RAW, as well as the whole folder onto the bat.

I think that at this stage it would be useful to give you a real overview of what I'm doing - I wrote a post a while ago to explain my method to others:

http://www.dyxum.com/dforum/walkthrough-to-adding-lens-ids-in-lightroom_topic39797.html?KW=

and I have also shared my troubles on the same forum where a couple of other users have described running Win7 64bit and not having any problems:

http://www.dyxum.com/dforum/topic54702&get=last.html#602023

I look forwards to your response!  Adam

Archive

[Originally posted by exiftool on 2009-11-06 18:12:57-08]

Ok.  The only way I can see you getting the help text with the above
code is if you are using a REALLY old version of exiftool.  What
version are you using (run "exiftool -ver")?

The current version is 7.99.

- Phil

Archive

[Originally posted by abramley on 2009-11-06 19:12:16-08]

Sorry - newbieness coming out here.

How would I run exiftool with -ver?  I created a bat file which was simply:

Code:
c:\exiftool\exiftool.pl -ver
pause

But this also gave me the help screen.  Unless exiftool is royally screwed on my machine...

Archive

[Originally posted by exiftool on 2009-11-06 22:35:22-08]

So exiftool just isn't getting any of the options you pass.
Something fundamental is wrong here.

It is interesting to me that you are running the Perl version
of exiftool (exiftool.pl) instead of the Windows executable
version (exiftool.exe).  For this to work, you must have
installed Perl, which I find surprising because this is not
the usual thing to do.  Let's take a step back.  Tell me
exactly how you installed exiftool.

Also, it would be useful if you learned how to run
exiftool from the command line.  To open a command
window in XP, you select "Run..." from the "Start" menu
then type "cmd".  Hopefully in Windows 7 something
similar to this works too.

- Phil

Archive

[Originally posted by abramley on 2009-11-07 00:28:32-08]

Last post for the night - I need some sleep!

I'm running the perl version of exiftool because I believe that only using the perl version do you get access to the /lib/Image/Exiftool/Minolta.pm file - I've edited this to reflect the lenses that I use.  Do I get access to this file using the .exe?  If that's the case and it would be simpler to go with that than to fuss around with perl then I'm more than willing!

To install exiftool, I followed the instructions here:  http://www.exiftool.org/install.html.  I installed the 64bit version of activeperl from here: https://www.activestate.com/activeperl/downloads/  choosing the 64bit windows version.  This is the only change that I've made from my 32bit vista install - although I have to admit that I installed everything so long ago that I can't remember my exact steps back then.

I'm good to go with the command line - I couldn't get it to work before because I'd not set the associations (or they didn't work in the DOS environment) so I wasn't typing perl exiftool.pl -ver.  That all works now and I'm actually still on v7.56 - will update that now...