Reply To: Process multiple input files during a single run

Paul Glagla’s contributions Forums Forum about ImageGrab Process multiple input files during a single run Reply To: Process multiple input files during a single run

#2575
AvatarAnonymous
Inactive

I have developed a workaround by creating a Windows command file (i.e. a .BAT file). Below is an example of a .BAT file which will run ImageGrab on three .MP4 files in the current directory:

Title Image Grab
“C:\Program Files (x86)\ImageGrab\ImageGrab_60en.exe” ^
+swi_o=File_01.mp4 +swi_inter ^
+swi_o=File_02.mp4 +swi_inter ^
+swi_o=File_03.mp4 +swi_inter ^
+swi_q

ImageGrab must be correctly configured before this .BAT file can be run. This is done by starting ImageGrab, configuring the ImageGrab settings (e.g. intervalometer, destination folder, picture names, etc.), then closing ImageGrab. Now either start the .BAT file from Windows Explorer (e.g. double click on the appropriate icon) or Shift+Right Click in the folder to open a Command Window and run the .BAT file.

A quick method of obtaining a list of the .MP4 files in a folder is to first open a Command Window in the folder. Next enter the command
> dir /b *.mp4 > videos.bat

This command will create a .BAT file which contains a list of the .MP4 files in alphabetical order, one file name per line. Then use your favorite text editor to edit the .BAT file to add the additional .BAT file commands.

To continue the above example, the videos.bat file contained:
01_Create.mp4
02_Durations.mp4
03_Numbering.mp4

I edited the file to look like this:
Title Image Grab
“C:\Program Files (x86)\ImageGrab\ImageGrab_60en.exe” ^
+swi_o=File_01.mp4 +swi_inter ^
+swi_o=File_02.mp4 +swi_inter ^
+swi_o=File_03.mp4 +swi_inter ^
+swi_q

Ending all but the last line with ” ^” is critical. Starting all but the first line with a ” ” is optional, but makes it easier to verify that the correct information was added.

I would prefer to be able to process multiple input files within ImageGrab itself (either by providing additional information in a configuration window or by adding an ImageGrab script). Until then, creating the .BAT file is not that difficult to do.