1

I have a droplet that uses imagemagick "convert" to compress multiple files that I drag and drop on to the droplet. I have scavanged the code from other sources online and don't really understand what it is doing. My problem is, I can only drag and drop 82 files at a time, any more and the script will not work.

Here is my code:

if not exist "%~p1output\"NUL mkdir "%~p1output\"
:nextFile
   if "%~1" equ "" goto exitLoop
   convert "%~1"* -quality 70 "%~p1output\%~n1%~x1"
   shift
   goto nextFile
:exitLoop

Any help is appreciated.

Mark
  • 3,609
  • 1
  • 22
  • 33

1 Answers1

3

The batch gets the dropped file names via command line. The length of the command line is limited to 8191 characters. So I think more than approx. 80 names exceeds the limit.

Community
  • 1
  • 1
Endoro
  • 37,015
  • 8
  • 50
  • 63