Process multiple input files during a single run

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

The ImageGrab Forum is dedicated to discussing this Paul Glagla's software. If your question or comment  does not concern directly ImageGrab, please focus on other forums.

This topic contains 2 replies, has 1 voice, and was last updated by  oldGIFer 1 month, 2 weeks ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #2574
    oldGIFer
    Participant

    First, 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!

    #2575
    oldGIFer
    Participant

    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.

    #2576
    oldGIFer
    Participant

    Oops, I made a mistake in the above post.

    The content of the videos.bat should be:
    File_01.mp4
    File_02.mp4
    File_03.mp4

    Sorry for any confusion that listing the wrong filenames may cause.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.