News:

2023-03-15 Major improvements to the new Geolocation feature

Main Menu

subfolder processing does not work

Started by Rerol, March 01, 2020, 04:20:56 PM

Previous topic - Next topic

Rerol

subfolder processing does not work,
what am I doing wrong?

exiftool -recurse "-FileCreateDate>CreateDate" -overwrite_original * .mp4

where is the mistake?

StarGeek

See Common Mistake #2 and read the docs on the -r (recurse) option.

Using the -r option is only meaningful if you are processing a directory.  By using the asterisk, you are passing file names.  Change * to a dot . and recurse will work.
* 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).

Rerol

Quote from: StarGeek on March 01, 2020, 04:25:32 PM
Using the -r option is only meaningful if you are processing a directory.  By using the asterisk, you are passing file names.  Change * to a dot . and recurse will work.

I tried the new code, but it does not work on subfolders.
exiftool -r. "-FileCreateDate>CreateDate" -overwrite_original *.mp4

Rerol

I managed,
exiftool -r. * "-FileCreateDate> CreateDate" -overwrite_original * .mp4

It is right?

but a lot of errors, it starts to process all files, not just * .mp4, but also others. How to fix it ?

sevy

did you try to change *.mp4 by "-ext mp4"  ?

Hayo Baan

Quote from: sevy on March 02, 2020, 02:53:13 PM
did you try to change *.mp4 by "-ext mp4"  ?

While -ext mp4 is in fact the best solution (see FAQ for the various reasons why), the problem was the space after the * in the command used (it read * [space] .mp4 instead of *.mp4. The former matches everything and a file called .mp4 (which probably doesn't exist) while the latter will only match files ending in *.mp4.

Enjoy,
Hayo
Hayo Baan – Photography
Web: www.hayobaan.nl

Rerol

Quote from: sevy on March 02, 2020, 02:53:13 PM
did you try to change *.mp4 by "-ext mp4"  ?

yes, now everything works!
thanks

how to combine two code commands?
exiftool -r. * "-FileCreateDate>CreateDate" -overwrite_original -ext mp4
and
exiftool -r. * "-CreateDate-=0:0:0 3:0:0" -overwrite_original -ext mp4

StarGeek

The dot, which represents the current directory, needs to have a space between it and the -r.  Or event place it separately at the end of the line.  Or list the entire directory path.

The asterisk should be removed completely, as mentioned in the links in my first post.
* 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).