I run exiftool from a shell script. I use the -geotag option to add geo data to the jpeg-exif.
The files are in the current working directory. Th original files a re on directory above the current working directory.
When I run the shell script it modifies the files in the current directory AND the original files in the directory above the current directory.
How can I limit the scope of exiftool?
Here is the shell script:
#! /bin/bash
echo
if [ $# -lt 1 ]
then
echo " Syntax: geotag log-file image-file"
echo " Image-file can be a wildcard"
exit
fi
for fn in $@
do
if [ $fn != $1 ]
then
echo " Processing file: $fn"
exiftool -P -geotag $1 `pwd`/$fn
fi
done
ExifTool will only modify the files that you tell it to. Your script must be either specifying the files in the parent directory, or the parent directory itself. Check your script.
- Phil