Max length of parameter

Started by Rene, January 09, 2022, 04:49:58 AM

Previous topic - Next topic

Rene

Good Morning,

What is the max length of a parameter?

For renaming files mainly I use
exiftool -q -q -progress -P -api largefilesupport=1 "-Filename<${CreateDate}__%lf.%le" -d "%Y-%m-%d_%H-%M-%S" *.arw *.cr2 *.dng *.jpg *.mp4 *.avi *.mov
which is a very general command line. The big disadvantage of this command line is that it works for the whole directory and not selected files.

Before continuing I have to tell that I run EXIFTOOL as a shortcut in my file manager Speedcommander. To select only specific files I have created a command line which considers only selected files (by the SC parameter $(ActSel)). EXIFTOOL works fine with this shortcut.
exiftool -q -q -progress -P -api largefilesupport=1 "-Filename<${CreateDate}__%lf.%le" -d "%Y-%m-%d_%H-%M-%S" $(ActSel)

But If I select a lot files, sometimes EXIFTOOL does not run the command due to too long parameters. "$(ActSel)" in SC is a placeholder for the whole pathes of the files (e.g. %USERPROFILE%\Pictures\FILE_1.EXT; %USERPROFILE%\Pictures\FILE_2.EXT; %USERPROFILE%\Pictures\FILE_n.EXT).

I have also the possibility to create in Speedcommander a virtual list of files (ANSI, UTF8, UTF16) and provide it as a parameter. Unfortunately EXIFTOOL does not work with a list of files.

Does someone has a hint how I can run EXIFTOOL without this limitation for selected files and would provide it?

Phil Harvey

This is a limitation of your command shell.  Either choose a shell with longer command-line ability, or use the ExifTool -@ option to pass arguments to exiftool through a file.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

StarGeek

Windows has a command line max length of about 8,000 characters.
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype