News:

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

Main Menu

Lots of files --> "Argument list too long"

Started by trollerboy, August 17, 2016, 05:02:04 PM

Previous topic - Next topic

trollerboy

Hi - I'm new to exiftool but love it so far and have used it successfully.  I am currently faced with a rescue drive of  about 800,000 files.  When I try to use exiftool, even on a large subset of this, I receive the following error message:

sh: /usr/local/bin/exiftool: Argument list too long


Any ideas of how to override this?

Thanks!

-TB

Hayo Baan

Looks like you provide the files individually to exiftool. Thoug the limit is high, there still is a limit to how many arguments you can pass this way. Why don't you use the -r option and just provide one or more directories? exiftool will then recurse into all directories it finds from there. If you want you can limit the file types by using e.g., -ext JPG.

Hope this helps,
Hayo
Hayo Baan – Photography
Web: www.hayobaan.nl

StarGeek

It might also just be the limit of the number of characters in a command imposed by the OS.  Windows cmd is limited to just over 8k characters.  According to this stackoverflow answer, linux can be "anywhere from 131072 to 2621440".

Another alternative would be to save the full filepath/names list to a text file and then passing that to exiftool with -@ /path/to/filelist.txt
* 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).