Process multiple input files during a single run
Paul Glagla’s contributions › Forums › Forum about ImageGrab › Process multiple input files during a single run
- This topic has 3 replies, 2 voices, and was last updated 6 years, 1 month ago by
paulglagla.
-
AuthorPosts
-
2019 September 1 at 8 h 51 min #2574
AnonymousInactiveFirst, I think your tool is very intuitive to use and the layout of the components is very efficient and user-friendly. The tool has been very easy to use and has worked well on my Windows 7 SP1 x64 system.
However, I can only process one file at a time. I would like to process multiple files in the same directory in one run.
After configuring the ImageGrab settings (e.g. intervalometer, destination folder, picture names, etc.), I had hoped I could simply select multiple files to open. However, the open mechanism only allows for one file at a time.
I have tried to create a script to process multiple files, but apparently I do not have a good understanding of the scripting language. I expect that the settings made in the tool would be used by the script, so that the script would just be a loop which opens a file, runs the intervalometer, closes the file, then repeats until all the video files have been processed. But I’ve not been able to create a script that works.
I am looking for advice on how to write a script like this. Any suggestions would be greatly appreciated.
Thanks!
2019 September 1 at 22 h 02 min #2575
AnonymousInactiveI 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_qImageGrab 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.batThis 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.mp4I 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_qEnding 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.
2019 September 1 at 22 h 06 min #2576
AnonymousInactiveOops, I made a mistake in the above post.
The content of the videos.bat should be:
File_01.mp4
File_02.mp4
File_03.mp4Sorry for any confusion that listing the wrong filenames may cause.
2019 December 27 at 10 h 26 min #4153
paulglaglaKeymasterHi. Sorry for my late reply: I was developping the new versions of ImageGrab.
You should try the version 6.1.5 or above and read the Documentation of ImageGrab. There is now a script language that allows you to process all files in a folder at once.
Besides, I have changed the switches to use in command line. They no longer start with swi_. Thus you may open a file with +o=”filename” -
AuthorPosts
- You must be logged in to reply to this topic.

