Author Topic: subfolder processing does not work  (Read 222 times)

Rerol

  • Jr. Member
  • **
  • Posts: 13
subfolder processing does not work
« on: March 01, 2020, 04:20:56 PM »
subfolder processing does not work,
what am I doing wrong?

Code: [Select]
exiftool -recurse "-FileCreateDate>CreateDate" -overwrite_original * .mp4
where is the mistake?

StarGeek

  • Global Moderator
  • ExifTool Freak
  • *****
  • Posts: 3794
Re: subfolder processing does not work
« Reply #1 on: March 01, 2020, 04:25:32 PM »
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.
Troubleshooting hints:
* When posting, include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).
* Double all percent signs (%) in a Windows batch file.
* If your GPS coords are negative, make sure and set the GpsLatitudeRef and GpsLongitudeRef tags correctly.

Rerol

  • Jr. Member
  • **
  • Posts: 13
Re: subfolder processing does not work
« Reply #2 on: March 02, 2020, 01:40:21 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.
Code: [Select]
exiftool -r. "-FileCreateDate>CreateDate" -overwrite_original *.mp4

Rerol

  • Jr. Member
  • **
  • Posts: 13
Re: subfolder processing does not work
« Reply #3 on: March 02, 2020, 01:56:53 PM »
I managed,
Code: [Select]
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

  • Full Member
  • ***
  • Posts: 30
Re: subfolder processing does not work
« Reply #4 on: March 02, 2020, 02:53:13 PM »
did you try to change *.mp4 by "-ext mp4"  ?

Hayo Baan

  • Global Moderator
  • ExifTool Freak
  • *****
  • Posts: 1140
  • Professional Photographer & Software Developer
    • Hayo Baan – Photography
Re: subfolder processing does not work
« Reply #5 on: March 02, 2020, 03:05:26 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

  • Jr. Member
  • **
  • Posts: 13
Re: subfolder processing does not work
« Reply #6 on: March 02, 2020, 04:04:47 PM »
did you try to change *.mp4 by "-ext mp4"  ?

yes, now everything works!
thanks

how to combine two code commands?
Code: [Select]
exiftool -r. * "-FileCreateDate>CreateDate" -overwrite_original -ext mp4and
Code: [Select]
exiftool -r. * "-CreateDate-=0:0:0 3:0:0" -overwrite_original -ext mp4

StarGeek

  • Global Moderator
  • ExifTool Freak
  • *****
  • Posts: 3794
Re: subfolder processing does not work
« Reply #7 on: March 02, 2020, 04:58:04 PM »
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.
Troubleshooting hints:
* When posting, include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).
* Double all percent signs (%) in a Windows batch file.
* If your GPS coords are negative, make sure and set the GpsLatitudeRef and GpsLongitudeRef tags correctly.