in reply to Executing external programs

That's my very personal opinion substantiated by my experience (but please feel free to criticise). I offer a Perl-based general solution at the end of my diatribe.

Windows', as its name implies, selling point is having windows: i.e. interactive(*) sessions for the average user: click-click-file-open-click-confirm-click-yes. The user clicking is part of the Windows business model. Despite that, Windows are forced to provide a commandline which is intentionally a very hostile environment, after so many years of existing, for anyone to work. Possibly gone backwards from old dos5 functionality which was acceptable.

Most users I have seen in similar situations have not dared to imagine that it could be possible to automate a menial and tedious task: the very definition of what the computer was meant to be and be doing for us. Hang on mad hacker, that's the wrong definition! The correct definition is that the computer was re-invented to mean "making money from users (and usually their lives worse too)". So, for me, it is twice a positive sign, to see anyone questioning the yoke modern computer companies fit on clients' necks and rise, to question it, albeit quite naively but that's not the issue because The Rubicon has been crossed and Rome awaits for you out there, and lot-a pizza.

So, how can you achieve what you want: You use tools whose job is very specific and therefore do not require you to interact with them bar the initial setup. ImageMagick, as an example because other Monks here mentioned it - is one of them. Their logo is a wizard with a magic stick. And rarely has a logo been most appropriate. You give it an image in, you give it a task, e.g. "convert format" or "resize" or "reduce quality" (+50 more to chose from), you specify the output file and execute it from the command line. Any errors, e.g. input not found, are reported at the commandline and program exits with a numerical code which you can read or have your tools, programmatically read and act accordingly.

So, now you know how to convert/resize one image without those pesky clicks-confirm-are-you-sure-file-open-file-browser-not-remembering-your-last-dir-navigate-to-obscure-dir-blah-blah. And you have a way to know whether the conversion succeeded (by the exit status/code). It's time to loop everything together over all the zillions of files you have. Each commandline has its own loop construct, Windows too: something like FOR %%parameter IN (*.jpg) DO magick-covnert ... But that's still primitive. You can create a batch file, a shell script which puts together everything. Another step in the right direction would, in my opinion and experience, be to move to linux. Pick a friendly distribution, say ubuntu or whatever, and use their commandline. But that's probably too drastic a step for one to take and you are too wet from crossing the Rubicon already, maybe leave that for another day. Plus, linux is not for everyone.

But there is another option for you and that's Perl. There is already an image manipulation module for Perl (based on Magick, GD, possibly others, check Image::Magick, GD). So, first install Perl for Windows. Others here can suggest which distribution. And then write a Perl script which reads in the files (by specifying a filename pattern or a dir) you want to convert and converts them. Add a GUI with Tk so that your users do not feel way out of their comfort zone and you are done. Perl is also portable, so your script will work in Linux and Windows and OSX.

Bottomline is: Perl is the easiest way to achieve what you want and there is no Tim Toady about that.

(*) Interactive Experience: here is an alternative definition: I want users to be riveted to their keyboards and have their attention devoted to me, the OS, and my popups. Nothing should distract them from this. Also, users should not be able to predict if and when something will go wrong. The GUI's response should be as random as possible in order to project the fear of the unknown to the user. And pay even more attention to me, the OS, and my popups.

bw, bliako