Batch Runner
Run multiple programs in a batch..

Designed for testing, useful for all-sorts!

Welcome to Batch Runner, a simple program that enables you to run lots of other programs, in one big batch.

While originally designed for running test suites on in-development applications, Batch Runner has proven useful for all sorts of jobs where you need to run two or more programs one after another, or the same program over and over with different parameters or switches.

How does Batch Runner work?

Batch Runner's operation is very simple. The main GUI/window is a list of commands in the current batch, and a few controls for you to switch between different batches, run the batch, and so on.

Batch jobs are stored in Batch Runner's ini (configuration) file, and can be created, edited and deleted there, or from within the main GUI. You simply select a batch, and which commands you would like to run (all, by default), and then click Run batch!.

You can configure and store any number of different batch jobs, with any number (well, thousands) of commands within each batch. Commands (program paths, with any optional switches and parameters) run consecutively; when the first completes, Batch Runner starts the next, and so on, until all the selected commands have completed.
 
image of Batch Runner's main GUI, with my test batch selected
A log of each batch is created at the end of the job, recording the name of the batch processed, status of each command; success, fail, exit code, error code, time taken, etc.

Click the New command button to add a new command to the current batch. The add new command.. dialog appears for you to enter whatever commands and parameters you need, as many as you need.

You can drag and drop applications, folders, and files onto this dialog to have their paths pasted automatically into the input - building complex commands with switches and optional parameters is quite painless. You can even drag in multiple items (Batch Runner will put spaces between the items, so you don't have to). image of Batch Runner's 'Add New Command' GUI, where you can add commands to the current batch

The command list has a context menu; you can right-click it and do stuff, edit selected commands, delete commands, and so on. Between all these controls, you should be able to do pretty much everything you need.

Apart from delete batches, that is. To do that, hold down the SHIFT key when Batch Runner is active, and the New batch button will switch to a Delete batch button, which will do exactly that. Careful now.

image of Batch Runner's 'Edit Command' GUI, where you can edit commands from the current batch
Note: the edit dialog behaves exactly like the add new command.. dialog; you can drag and drop stuff onto it, etc. It also shares the same dimensions and position, so wherever you put one, the other will also be, the next time you use it.

All the dialogs remember their size and positions (except minor prompts), and along with a few other preferences, this information is stored in Batch Runner.ini, which lives next to Batch Runner itself. In there, you can also change some of Batch Runner's behaviours..
 

User Preferences

All Batch Runner's preferences are stored in a standard, plain-text Windows ini file, named Batch Runner.ini. Simply drop it into any decent text editor and edit away. If you mess up, you can delete/rename the file, and Batch Runner will drop a new one into place, automatically. These are the preferences which you may usefully alter..

log_path=Batch Runner.log
Name of the log file. Leave this blank to disable logging.

Note: You can use a full path here, if you don't want to log into the program's folder.

You can also use @tokens in the log_path preference. These will automagically convert to real values when the log is written. Available tokens..

@Desktop
Your Desktop.

@UserDir
Batch Runner folder in your User Application Data folder (aka. "AppData").

@batch
The name of the current running batch.

@sec, @min, @hour, @mday, @mon, @year, @wday, @yday, @now, @date

Various time and date tokens, in order, current; seconds, minutes, hour, day of month, month, year, day of week (1-7, Sun to Sat), day of year (1-366, 355 if a leap year). All values are numeric.

There are also a couple of special short-format tokens; @now, which translates to the full date and time in the format "year-month-day @ hour.min", e.g. 2007-09-21 @ 22.09, and @date which is simply "year-month-day", e.g. 2007-09-21. They can be combined in any way you choose.

Note: If you use dynamic tokens in your log, you can do all sorts of interesting things, create batch-specific logs, auto-rotating logs, and more. It also means you will create more logs. For most people, simply using a single file name is the best approach; Batch Runner will append all new logs to that one file.

select_all=true
When you select a new batch, all the commands are automatically selected, ready to run.

show_tips=true
Helpful pop-up ToolTips for all the controls.

notify=true
Batch Runner will pop up a notification when complete. Or not.

warn_delete_batch=true
Warn about deleting batches.

warn_delete_command=true
Warn about deleting commands.

min_width=430
Minimum width of the main gui - it will snap back to this.
430 pixels is the recommended minimum width.

min_height=96
Minimum height of the main gui - it will snap back to this.
96 pixels is the recommended minimum height.


 
All other ini sections will be your actual batches. You can create and delete batches, as well as add, edit and delete their commands from inside the Batch Runner interface, so there's no real need to edit them in the ini file. But if you prefer that, it's easy enough; the batches are in a very simple format..

The section [name] is the name of the batch, and each preference is one single command in the form, name=command. For example..
[compaction example]
compress reports=compact.exe /C /S I:\work\documents\reports\*.log
uncompress reports=compact.exe /U /S I:\work\documents\reports\*.log

 

Portable operation

Batch Runner will happily operate in a completely portable state. Basically, if there's an ini file next to Batch Runner, it will use it, and if there's not, it will use the one in your Application Data folder (in your user folder). In other words, if you want portable operation; simply place a Batch Runner.ini file next to Batch Runner.exe.

You can run multiple instances of Batch Runner, too, even all at once, with completely different settings for each instance. No problem.
 

Command-line operation

When launched, Batch runner usually loads the last-used batch and presents a graphic interface for you to work with your batches, but you can override this behaviour on the command-line.

Batch Runner accepts two (optional) command-line parameter; 1) the special switch: run, which instructs Batch Runner to run the batch immediately without the GUI - you can script and schedule Batch Runner, even run it from inside Batch Runner - think about it; and 2) the name of the batch e.g. to immediately run a batch called "test batch", use..

Batch Runner.exe run test batch

NOTE: Spaces in batch names are not a problem.

To immediately run the current (last-used) batch job (stored as current_batch inside Batch Runner.ini), use..

Batch Runner.exe run

To startup with a different batch (in this example, a batch called "some batch") loaded-up, use..

Batch Runner.exe some batch

NOTE..
 

Itstory..

Embedded fresh from..
http://corz.org/engine?section=beta/windows/batch runner&source=version.nfo

 

    #####    ###     ##  ### ########             ###     ##  ###    ###TM 
  #######  #######   ####### ########           #######   #######  ####### 
 ###      ###   ###  ###         ###           ###   ###  ###     ###   ## 
 ##       ##     ##  ##         ###            ##     ##  ##      ##    ## 
 ###      ###   ###  ##       ###              ###   ###  ##      ###   ## 
  #######  #######   ##      ########    ###    #######   ##        ###### 
    #####    ###     ##      ########    ###      ###     ##           ### 
                                                                     ####  


  Batch Runner
  Run multiple programs in a batch..
  
  http://corz.org/windows/software/batch-runner/
  
  (c) corz.org
  
  itstory.. aka 'version history'.. aka 'changes'.. 
  [known bugs at the bottom] 
  
  Key..
  
      *    Fixes
      ~    Changes
      +    New stuff
  
  
  Last updated: SUNDAY Jun 22, 2008


  0.6.5
  
    +   Batch Runner will now check for potential looping conditions. While
        this is unlikely, it is possible to run, for example, a command that 
        runs Batch Runner with the command that runs Batch Runner with a 
        command that runs Batch Runner, and so on, and do nothing except spawn 
        zillions of instances of Batch Runner. Eventually, this could bring 
        the system down. 

        Now you can set a limit in your preferences, up to a maximum of ten 
        instances.

  0.6.3

    +   Added a "View the Log" option to the system tray menu, which activates 
        once a log has been created, and will always load the most recent log 
        into your preferred editor.

    +   Batch Runner will now create (up to 9) sequential backups of deleted 
        batches inside the ini file (if you create and delete another batch
        with the same name).

  0.6.2

    *   Fixed a bug where deleting all the batches would incorrectly set the 
        current batch to a deleted batch. Also, Batch Runner could be fooled 
        into loading its own preferences as a batch, if you set them as the 
        "current_batch". It should now be impossible to fool Batch Runner into 
        loading such a batch, non-existent batches, etc.

    ~   Attempting to add a new command when there are no batches will now 
        first bring up the "New Batch" dialog, so you have something to add 
        the command to.


  0.6.1

    +   Batch Runner now uses a different tray menu while running commands.
    
    +   The tray icon now flashes during batch runs, to let you know it's 
        active (in both gui and background mode).

    +   Added Pause, Resume and Abort menu items to the System tray menu that
        appears during batch runs - kinda essential, really. During pause, the 
        tray menu icon stops flashing.

    +   You can now drag and drop programs directly onto Batch Runner's main 
        command list. 

    +   Added "Delete" HotKey to delete the selected commands from the list.

    +   Batch Runner now checks for out-of-desktop dimensions, and fixes them 
        automatically.
    
    +   Added an "Edit Preferences" option to the tray menu - you can set your 
        preferred editor in the prefs, too.

    ~   Started a habit of making all message boxes run as children of the main
        GUI so there's only one taskbar entry during warnings and such. It's
        something I've not really considered before - I usually click such 
        things immediately away. This is tidier.

    +   Cleaned up some of the dialogs and what-not, correct icons, modality, 
        window titles, and so on.

    +   Added "beep" option to have an audio alert when the batch is complete. 
        This might be useful when running batches transparently, with no GUI.

          Options..

            false           no audio
            true            use default PC speaker beep at 1000Hz
            <number>        beep PC speaker using this frequency (in Hz)
            <file path>     play this WAV file

    +   Added more exit codes - handy if running Batch Runner from inside 
        Batch Runner, scripting it, or whatever..

            0       Normal termination
            -9      User hard quit from tray.
            -1      One or more of the batch's commands failed 
                    (exited with an error state)
            5       Chosen batch is missing or invalid (in background mode)
            171     Missing ini file (and couldn't create one)


  0.5  [first public release]

    +   Added <enter> hotkey to the add & edit inputs - more intuitive. I'm using
        AutoIt's new accelerators for this, so I don't have to use the DEFBUTTON
        style, which makes buttons look ugly, imho.

    +   Incorporated a few more of my usual app "features"; namely, auto ini 
        updating (leaves existing batches and settings intact), optional 
        portable operation, ini @tokens, etc., as well as lots of associated 
        functionality, auto-log folder creation, and so on. I also created a 
        new token; @batch, which translates to the name of the batch being 
        run, as well as a couple of new date & time tokens, @date and @now.

    +   Added context menu to the combo drop-down, with "reload" option - only 
        really useful if you have only one batch, and add a batch to the ini 
        manually, and want it to show in the menu. 

    +   Added a "Reload list" option to the list's context menu.

    +   Expanded command-line options to include the "run" keyword, which 
        invokes Batch Runner to immediately execute the current batch and 
        exit. You can also specify a batch on the command-line (spaces in 
        batch names are okay). e.g. to run "foo bar batch" immediately, do..

            C:\Path\to\Batch Runner.exe run foo bar batch

    +   When you specify the "run" switch, Batch Runner launches as a background 
        process, runs the specified batch, and then exits. No GUI is created.

        It perhaps doesn't go without saying that as well as scripting and 
        scheduling Batch Runner, this means that you can run instances of 
        Batch Runner from *inside* Batch Runner, as Batch Runner commands. 
        Think about it. ;o)

    +   Batch Runner will now return a valid exit code on exit. If all was well, 
        the exit code is 0. -1 means one or more of the commands had an exit 
        error. The individual application errors will be in the log, if created.

    *   Fixed a bug where the normal tray would appear in background mode; there
        is now a separate tray menu for this, with one item - Exit, which will
        quit Batch Runner after the current command completes.

    +   The current running command is now displayed in the System Tray ToolTip.


  0.4

    +   Added delete warning messages, and ini options (you can switch them off).
        
    +   Added help ToolTips, and an option to disable them, if required.

    +   Batch Runner will now select all the commands in a newly selected batch, 
        so it is ready to run. This behaviour can also be disabled in the prefs.

    +   Added drag+drop to the add/edit dialogs, as well as cool height snapping.

    +   Added Tray toggle and tray menu (about, exit & run batch)

    +   The gui controls will now grey out during batch runs, to avoid potential 
        confusion and mishaps. Also the tray icon becomes unclickable.

    +   Added backup for deleted section (they are renamed "deleted-section"
        and will no longer display in the drop-down (though remain in the ini, 
        just in case). If you want to completely delete a batch, you must do 
        this in the ini.

    *   Editing commands no longer loses the command's selection in the list.


  0.3

    +   Added more buttons, New Command, New batch, and an edit command for the
        list's concept menu, as well as the dialogs to handle these.

    +   A few minor improvements to the gui, spacing, control resizing and such. 
        The gui now has a minimum size it will snap to if you make it too small.

    *   I fixed the window size drift. That always annoys.

    +   Batch Runner can load-up a new default batch on the command-line, e.g..

            C:\Path\to\Batch Runner.exe My Batch


  0.2   

    +   Added list concept menu - now you can delete and select commands from 
        the menu. Added preferences for height, position, etc., which are saved 
        to the ini file.

    +   Lists are a pain. I'm gonna be using the UDFs for this one!


  0.1   

        Basic batch running - a list, a drop-down, and a "Run batch!" button. 
        All editing is via the ini file. Batch Runner also does basic logging.


  2do..

    *   Add shirtware code! (So grab it NOW for a nag-free version!!!)



 

Batch Runner info complete!

That's about it for Batch Runner. Hopefully it should be intuitive to operate, and you won't have any problems running batches of programs without any more help from me; but if you do have any questions, or issues, or find a bug; feel free to leave a comment below.

The current release version is 0.6.5, here's the download link..

 


Batch Runner.zip hashes:
MD5: 5dabe2346890398df8795ca123763c62
SHA1: 55faa4f0da67da53ecd869ac878b98d638ad7d4a
 
 
 
cbparser powered comments..

koti - 22.08.08 5:01 am

nice


Macy - 04.10.08 12:15 pm

Just what I was looking for! Worked great. Thanks!


 

leave a comment, become part of this site!


First, confirm that you are human by entering the code you see..

(if you find it difficult to read, refresh the page for a new code)


Enter the 5-digit code this text sounds like : lower-case zed, Upper-Case Tee, s-heaven, lower-case arrgh, Upper-Case Aye


 
 
[site notice]

PLEASE, !