Specifying output path.

Started by TrevorS, March 14, 2021, 03:10:40 PM

Previous topic - Next topic

TrevorS

I'm on a Linux machine, staging all of my images to be moved to a new machine.

I chose to 'cd' to the destination folder and specify paths relative to my home directory for the source.
This and similar commands work...

trevor@trevor-office:~/STAGED_PICS$ exiftool -o-m  . '-Directory<DateTimeOriginal' -d %Y/%m -r ~/Pictures

But when I try to collect images from another user's home/pictures folder exiftool seems to operate on the current directory.

trevor@trevor-office:~/STAGED_PICS$ exiftool -o-m  . '-Directory<DateTimeOriginal' -d %Y/%m -r /home/emese/Pictures
trevor@trevor-office:~/STAGED_PICS$ exiftool -o-m  . '-Directory<DateTimeOriginal' -d %Y/%m -r ~emese/Pictures


Both start processing the images already in STAGED_PICS.

How can I specify a path to this user's folders? I have read access.

I also had a similar problem with a folder of my own that had spaces. I tried single quotes around it and \ before each space.

Thanks

StarGeek

One main problem with your command is this part
-o-m  .

I'm guessing that you're trying to use the -o (-out) option and the -m (-ignoreMinorErrors) option, but when they're bunched up like that, you're instead telling exiftool to output the value of the "o-m" tag, which obviously doesn't exist so there's no output for that.  And then since the dot is by itself, it's considered a source for files to process.

Try
-o . -m
* 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).

TrevorS

Thanks. That worked. Some Unix commands take options that way, so it was habit.

But my earlier runs seemed to work (although I may have added the -m later).

I'm still a bit mystified by the . after the -o ;-)  I have used exiftool with a fully qualified destination in -d  and still seemed to need it.

Sorry I posted this in the wrong place at first. I found other posts with titles like "Redirecting output" so I thought it was the place to be.

A little late, but:-

OS is Ubuntu 20.04
exiftool version is 11.88

StarGeek

Quote from: TrevorS on March 14, 2021, 03:43:34 PM
I'm still a bit mystified by the . after the -o ;-)  I have used exiftool with a fully qualified destination in -d  and still seemed to need it.

From the docs I linked above
    When writing only FileName and/or Directory "pseudo" tags, -o causes the file to be copied instead of moved, but directories specified for either of these tags take precedence over that specified by the -o option.

In this case, you're writing to the Directory pseudo tag.  But -o still requires a second parameter, so it's filled the the path to a dummy directory.  A single dot is the shortest path you can use, so it's the most common example.  You could just as easily used This/is/a/totally/fake/path/  ;)

See Writing "FileName" and "Directory" tags for more details on the pseudo tags.

QuoteSorry I posted this in the wrong place at first. I found other posts with titles like "Redirecting output" so I thought it was the place to be.

As it says in the main part of the forum, that sub-forum is for "Executing ExifTool from within other applications".  No biggy, it's all pretty casual around here.
* 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).

TrevorS

I wonder if exiftool should have reported my -o-m as an error? Especially since the -o takes a mandatory parameter.

I can write
ls -la
or
ls -l -a
but not
ls -l-a


StarGeek

Quote from: TrevorS on March 14, 2021, 10:26:32 PM
I wonder if exiftool should have reported my -o-m as an error? Especially since the -o takes a mandatory parameter.

How would it tell that by -o-m you meant the -o and not a tag named "o-m"?  Exiftool can list tags that it doesn't necessarily have definitions for, especially with regards to XMP.
* 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).

TrevorS

Sorry - I see now that would be very difficult to  disambiguate.

I need to read the man(1) page more carefully. Thanks for your patience.