ExifTool Forum

General => Metadata => Topic started by: alaska_av8r on February 17, 2021, 03:45:27 PM

Title: Spaces in Command Line
Post by: alaska_av8r on February 17, 2021, 03:45:27 PM
Holy Cow this is driving me crazy.  I've looked all over but cannot get this to work consistently.

I am using this command line on my NAS (Linux) to change the model metadata to allow easier filtering.

What is giving me problems is dealing with spaces, should I be using single quotes, double quotes or no quotes at all in a command like shown below.

exiftool -m -model=iPhone 11 Video *.MP4

if i use single quotes it gives an error file not found for 11 and Video, if i use double quotes they show up in the metadata field.

** and will this be different on a Mac

thank you
tim
Title: Re: Spaces in Command Line
Post by: Phil Harvey on February 17, 2021, 04:45:38 PM
Hi Tim,

This should work in any o/s:

exiftool -m -model="iPhone 11 Video" *.MP4

- Phil
Title: Re: Spaces in Command Line
Post by: StarGeek on February 17, 2021, 07:29:06 PM
Quote from: alaska_av8r on February 17, 2021, 03:45:27 PMif i use double quotes they show up in the metadata field.

** and will this be different on a Mac

Since you mention a Mac, double check to make sure you're using regular quotes ' & " and not fancy quotes  ' ' & " "

There's a setting on the Mac that will automatically turn regular quotes into fancy quotes, even in the terminal.  The terminal requires regular quotes.


Title: Re: Spaces in Command Line
Post by: alaska_av8r on February 18, 2021, 12:25:30 AM
StarGeek i checked and the quotes appear as straight as can be, I'll attach a screen shot.

Phil when I use "double quotes" then the field that I use them on, such as -make="Nikon Z7" -model="Nikon Z7 Video" shows up in Lightroom with the double quotes, I'll show you an example attached.

Also in reading your FAQ's and other places on the site you mention the drawbacks of using wildcards.  I searched to get an example of how I would use the command below pointed at a directory but could not find one, can you point me in the right direction.

exiftool -m -make="iPhone" -model="iPhone 11 Video" *.MOV

I just noticed and remembered something, I did not have any problems when I edited the Nikon Z7 and the Mavic Pro 2 drone videos, they display properly and take the command fine with no errors.  However when I downloaded my iPhone videos, that is when I ran into that Large File support not enabled error message and had to edit ExifTool_config.  That is when the problems began, not sure if that is coincidence or not.

tim



Title: Re: Spaces in Command Line
Post by: StarGeek on February 18, 2021, 12:40:43 AM
Quote from: alaska_av8r on February 18, 2021, 12:25:30 AM
StarGeek i checked and the quotes appear as straight as can be, I'll attach a screen shot.
<snip>
exiftool -m -make="iPhone" -model="iPhone 11 Video" *.MOV

You're using fancy quotes in this example, and that is what appears to be in your second image.  Compare them to the quotes in the GPS coordinates below.
(https://exiftool.org/forum/index.php?action=dlattach;topic=12183.0;attach=4018)

Quote from: alaska_av8r on February 18, 2021, 12:25:30 AMAlso in reading your FAQ's and other places on the site you mention the drawbacks of using wildcards.  I searched to get an example of how I would use the command below pointed at a directory but could not find one, can you point me in the right direction.

On the command line, a single dot . indicates the current directory (two dots .. indicates the parent directory).  So your command would be
exiftool -m -make="iPhone" -model="iPhone 11 Video" -ext mov .
Title: Re: Spaces in Command Line
Post by: alaska_av8r on February 18, 2021, 01:07:37 AM
StarGeek you are spot on, when i was typing into the terminal i was getting straight quotes, but I had the commands copied into a word document and it was changing the straight quotes to the fancy quotes, which I have never even heard of....

so at this point i think the problem is cured.......

nice job..
Title: Re: Spaces in Command Line
Post by: StarGeek on February 18, 2021, 01:44:24 AM
Quote from: alaska_av8r on February 18, 2021, 01:07:37 AM
StarGeek you are spot on, when i was typing into the terminal i was getting straight quotes, but I had the commands copied into a word document and it was changing the straight quotes to the fancy quotes

Ah, yes, I should have mentioned that as well.  MS Word, LibreOffice, Google Docs, and similar programs will try and "help" you by fixing quotes as well as other characters.
Title: Re: Spaces in Command Line
Post by: alaska_av8r on February 18, 2021, 01:00:22 PM
Yes their help works wonderfully when you don't want it to, and when you need it, not so lucky....ha.   I am just excited to have finally made progress from all of the chaos of past 2 weeks trying to get perl installed and this working.  It drives me nuts to not know the ins/outs and make a computer do what i want it to do, even more so when you read and study and still can't figure it out.

Another one:
Following Phil's advice on avoiding using wildcards, what is the syntax to perform this command, exiftool -m -make="iPhone" -model="iPhone 11 Video" *.MOV on images contained in a directory called TEST

Title: Re: Spaces in Command Line
Post by: StarGeek on February 18, 2021, 01:07:16 PM
Same as I posted above (https://exiftool.org/forum/index.php?topic=12183.msg65800#msg65800), just change the dot . directory path to the path to your test vids.
Title: Re: Spaces in Command Line
Post by: alaska_av8r on February 18, 2021, 01:49:00 PM
sorry i totally missed that, i got so excited that the problem had been fixed..... thank you