How can I: Automatically save as JPG with an auto-numbered filename

I am using the plugin "Divide Scanned Images" and is working well. My thanks to the author as it saved me some time, but now I am still wasting time doing the following:

If I place 4 photos on my fb scanner, scan them, then run the plugin, it correctly separates the scan into four images.

The problem is I now have to file, save as on each of the four images, enter a filename and extension, answer the jpg prompt and finally get the image to save.

Is there a script/plugin/a default value or another method I can use to quickly save all 4 images as jpg with a filename that increments from the last filename, such as image0001.jpg, image 0002.jpg, etc.

Thanks in advance.

New Version

I have updated the script to include a batch mode:

Just an update -

Version 1.9 is now available at the same place: http://ffaat.pointclark.net/incoming/scripts/DivideScannedImages.scm

Gary D. Huffman, II pointed out that the images weren't being processed in alphabetical order in batch mode under Ubuntu. This just adds a sort algorithm that is applied first.

-Rob A>