exiftool is telling me my command is incomplete

Started by remarkableearth, December 13, 2017, 03:56:36 PM

Previous topic - Next topic

remarkableearth

I've customized a set of tags successfully in .ExifTool_config and written a bunch of values to thousands of files within directory trees using something similar to exiftool -r -customtag1=customvalue1 -customtag2=customvalue2 -customtag3=customvalue3 -tag1=- -tag2=- -tag3=- /dir/subdir/ .

And I'm trying to do it today but exiftool advances to the next line with the right arrow (>), telling me it is expecting more to the command to complete it.

I've tried substituting both -ext jpg and *.jpg to try writing to only jpgs but get the same thing.

Perhaps this is a simple fix that I'm just overlooking. Can anyone pinpoint my code error?

StarGeek

From other thread:
Quote from: remarkableearth on December 13, 2017, 06:28:00 PM
Now I have a problem writing more than one custom tag at a time which I've described in another question on this forum. Any ideas?

Sorry, I've got nothing.  I'm assuming Linux/Mac OS and am not familiar with this problem.  All I can suggest is trying a single tag and single file at a time to see if you can narrow down the problem.
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

Hayo Baan

If you get the continuation prompt > on the command-line, it means you either ended with a backslash \ or have an unbalanced quote somewhere on that line. The command you listed doesn't have either, but as you said that wasn't the exact command you used...
Hayo Baan – Photography
Web: www.hayobaan.nl

remarkableearth

Hi Hayo,

Thanks for your response. I checked the actual command and found all quotes balanced and no ending backslash.

So, I removed all quotes and replaced those values with single words (2 instances) and got the expected results when I ran it over a single directory of several files and over a set of nested directories. Then I wrote it to csv and fixed all the records that had test tags written. Not a difficult workaround but I'm left wondering why it balked at the quotes.

Alan Clifford


Hayo Baan

Quote from: Alan Clifford on December 14, 2017, 04:33:04 PM
You probably had a ` instead of a '
That or something that looks like a quote, but isn't eg " " or similar.
If you post the offending command line, I'll have a look.
Hayo Baan – Photography
Web: www.hayobaan.nl

remarkableearth

Hayo, the original problem of this post went away after some tweaking a few days ago (and I can't recall specifically what change to my code dropped the continuation problem) but now the problem is that a multi-word tag enclosed in single quotes such as -customtag1='multiword tag' produces a response similar to Error: File not found - tag'
    2 directories scanned
   20 image files updated
    2 files weren't updated due to errors


I tried double quotes and got the same error. My code has worked before as written but now is not.

Any ideas why it won't read the entire contents inside the quote as a value?

Phil Harvey

The quoting is wrong.  Your error shows some sort of angled single quote ('), but you need a straight single quote (') if you are on Mac or Linux, or straight double quote (") if you are on Windows.

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

remarkableearth

Ok. Thanks, Phil and others. I've got resolution:

Your response led me to investigate my workflow and how my keyboard writes characters. Typically I document my code by typing it into a Google doc first where editing is simple and quick. I type the single quote (') using the key with the single (') and double quotes (") on it. Then when I copy that text over to the Linux command line it copies as an italicized single quote (`) as Phil and Alan Clifford noted. On my keyboard, that's typed using a key in the upper left corner next to the key with the 1 on it. So clearly the character is changed in translation between Google and Linux.

When I corrected the incorrect quotation marks on the command line the error message vanishes and the value is written correctly. I learn something new everyday.

Thanks again.


StarGeek

Quote from: remarkableearth on December 20, 2017, 12:28:01 PM
Typically I document my code by typing it into a Google doc first where editing is simple and quick. I type the single quote (') using the key with the single (') and double quotes (") on it.

Where Google docs automatically changes single and double quotes into "smart quotes".

This is common word processor behavior.

You can change this behavior in Google docs by going to Tools Menu -> Preferences and then unchecking "Use smart quotes".
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

remarkableearth