ExifTool Forum

ExifTool => Newbies => Topic started by: j99mac on July 07, 2014, 12:30:30 PM

Title: File Path
Post by: j99mac on July 07, 2014, 12:30:30 PM
I am writing a script to add artist Tag to images. I am trying to pass a veritable to the Add Artist Tag

echo
    echo "please enter the path of images: "
    read input_variable
    IMAGE_DIR="$IMAGE_PATH"

echo "Add_Artist"
exiftool "$IMAGE_PATH" −EXIF:Artist="'ARTIST'"

I get the fallowing error

Error: File not found -
    0 image files updated
    1 files weren't updated due to errors

How do I write the script to have a file path veritable?
Title: Re: File Path
Post by: Hayo Baan on July 07, 2014, 02:04:18 PM
Have you already tried moving the filename part to the end of the line? I'm quite sure that's it.

HTH,
Hayo
Title: Re: File Path
Post by: j99mac on July 07, 2014, 03:19:20 PM
I just tried this  exiftool −EXIF:Artist="'ARTIST'" "$IMAGE_PATH"
and got the error "No file specified". Is this how I would add the variable
Title: Re: File Path
Post by: Hayo Baan on July 07, 2014, 04:59:19 PM
Hmm, looks like the $IMAGE_PATH doesn't get the value you want.  Looking at your script I must say I can't see how you set it, so that's likely your problem.

What is read input_variable supposed to do? My .bat scripting is a bit rusty (work with the bash shell myself on a Mac now but have worked with windows .bat files extensively too), but I don't think that's how you read your $IMAGE_PATH variable...
Title: Re: File Path
Post by: Phil Harvey on July 07, 2014, 05:00:53 PM
Also, you must use a simple ASCII dash before the exiftool options.  "-", not "−".

- Phil