ExifTool Forum

ExifTool => The "exiftool" Application => Topic started by: Sy on September 10, 2013, 06:14:13 PM

Title: Directory
Post by: Sy on September 10, 2013, 06:14:13 PM
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

Title: Re: Directory
Post by: Phil Harvey on September 11, 2013, 08:01:55 AM
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