Write tag value by drag and drop on a batch file

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

Previous topic - Next topic

Archive

[Originally posted by karlm on 2009-09-27 14:24:14-07]

Hi,
I use the command 'exiftool -GPSImgDirection=VALUE PATH\FILENAME' to add the image direction to the GPS image data. Rather than using the Run command for each image (in Windows XP), which is tedious or impracticable when the PATH is long, I would like to create a batch file for drag and drop. When the batch file runs it would set PATH\FILENAME=path\file_name of the dropped image, and stop and wait for input of the VALUE of the tag. Is this doable?
Thanks,
Karl

Archive

[Originally posted by exiftool on 2009-09-27 16:52:21-07]

I'm not a Windows expert, but I googled for "batch file input"
and it looks like something like this may work:

Code:
set INPUT=
set /P INPUT=Type input: %=%
if "%INPUT%"=="" goto nothing
exiftool -gpsimgdirection=%INPUT% -gpsimgdirectionref=True %*
:nothing
pause

Notice that I have also set GPSImgDirectionRef (to "True" for "True North"
but you can set it to "Magnetic North" instead if this is more appropriate),
because you should always set this when setting GPSImgDirection.

If this works as I think it should, you should be able to drop any number
of files and/or folders on this batch file to do what you want.  But my guess
is that it may break if the file and/or directory names contain spaces
or other special characters.

- Phil

Archive

[Originally posted by karlm on 2009-09-27 20:15:54-07]

Hi Phil,
It works! Thank you so much! And thank you for your extremely useful program!
Cheers,
Karl