ExifTool Forum

ExifTool => The "exiftool" Application => Topic started by: fantasticn on April 07, 2024, 04:53:17 AM

Title: Recursive scan - depth level of subfolders
Post by: fantasticn on April 07, 2024, 04:53:17 AM
I have stumbled across the Exiftool and the possibilities it offers are amazing. But I have not found out about a certain thing:

I have a "pictures"-folders with several subfolders and "sub-sub"-folders. If I use the option -r Exiftool will scan all subfolders. However, is there a way I can limit the scan to only a certain depth level, e.g. -r1 to only scan the first layer of subfolders or -r2 to scan the first and second layer of subfolders?

Thanks in advance for your reply!
Title: Re: Recursive scan - depth level of subfolders
Post by: StarGeek on April 07, 2024, 11:50:53 AM
Sorry, there aren't any options for the -r (-recurse) option (https://exiftool.org/exiftool_pod.html#r-.--recurse) to limit depth.

You can use the -ext (-extension) option (https://exiftool.org/exiftool_pod.html#ext-EXT---ext-EXT--extension) to change what file types are processed and you can use the -i (-Ignore) option (https://exiftool.org/exiftool_pod.html#i-DIR--ignore) to ignore specific directories, but that's about it.
Title: Re: Recursive scan - depth level of subfolders
Post by: Phil Harvey on April 07, 2024, 09:14:43 PM
What o/s are you using?  On Mac/Linux you can do something like this to scan a specific level (3 levels down in this example), but I doubt this works in Windows:

exiftool */*/*/*.jpg ...

- Phil