Author Topic: File Path  (Read 1163 times)

j99mac

  • Full Member
  • ***
  • Posts: 35
File Path
« 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?

Hayo Baan

  • Global Moderator
  • ExifTool Freak
  • *****
  • Posts: 1140
  • Professional Photographer & Software Developer
    • Hayo Baan – Photography
Re: File Path
« Reply #1 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
Hayo Baan – Photography
Web: www.hayobaan.nl

j99mac

  • Full Member
  • ***
  • Posts: 35
Re: File Path
« Reply #2 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

Hayo Baan

  • Global Moderator
  • ExifTool Freak
  • *****
  • Posts: 1140
  • Professional Photographer & Software Developer
    • Hayo Baan – Photography
Re: File Path
« Reply #3 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...
Hayo Baan – Photography
Web: www.hayobaan.nl

Phil Harvey

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 16724
    • ExifTool Home Page
Re: File Path
« Reply #4 on: July 07, 2014, 05:00:53 PM »
Also, you must use a simple ASCII dash before the exiftool options.  "-", not "−".

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).