BATBOX Command

Batbox is a command that allow creating easily console graphics and provide a simple interface to get user inputs through keyboard and mouse.

This manual page is about the 5.x versions of the batbox command in both module and external executable format. For a quick history of the command, please check out the history section.

5.x series are available as a separate executable and as a module for pBat, which enable much faster execution speed compared to separate executable. The BATBOX command is available for WINDOWS and Unix-based OSes.


MOD modules/batbox
:: command to load pBat batbox module

BATBOX  [/a chr] [/d string] [/g X Y] [/k[_] [name] | /l[_] [name]] [/w duration] [/c color] [/n] [/h show] [/m[_] [X Y type] | /y [X Y type]] ...

Create console graphics or get user input:

Several subcommands can be mixed, as sugested by in the command line. To mix subcommands, just specify several command one after another just as follows:

BATBOX /g 10 10 /d "Hello world" /g 0 0

This notations enables speed and size gains and makes the commands really versatile.

BATBOX 5.x is planned to come in two versions:

However as of version 5.0, the external version designed to be used with cmd.exe is not released but its release is planned for version 5.1.


Some subcommands require numbers to be passed to BATBOX. Such numbers can be specified in three numeral bases with the following prefixes :

For theses reasons, it is important to prepend the 0x suffix when dealing with the /c subcommand to specify hexadecimal notation.


The very first batbox command was programmed by Romain Garbi (also known as DarkBatcher) around the end of 2010 using C as programming language. The version 1.0 was released around the end of 2011 on the forum and had a little success thanks to its versatily but was quite handicaped by its big binary. Several minor version where released in order to lower the size of the binary.

To continue reducing the footprint of the command, a new version (2.0) entirely written in assembly language was released in april 2012. This allowed Batbox binary to become as little as 1.5 kB so it could be embedded in batch scrips. This new version met quite a lot of success among batch programmers. The command was regularly updated until march 2015, when version 3.1 was released, almost reaching the limits of the command architecture.

As a replacement for the old command, Romain Garbi started to develop a new command, superbox, that read commands through a named pipe instead of using command parameters. A beta was released in march 2015 but the command development was dropped because input commands caused data races with cmd.exe.

A command inspired by batbox and superbox, called darkbox was released by Teddy Astie (aka TSnake41) on October 2017. This command successfully fixed the races problem by using unamed pipes. Making it a fast and reliable server and a very good replacement to batbox.

After several years inactive, Romain Garbi started to develop a new experimental command, batbox4, to provide some innovative support to the old batbox command still being used. Based on the concept of lightweight server, this projet was dropped because it syntax was complex and darkbox already existed.

In november 2018, as modules features were starting to be added to the pBat interpretor, a batbox module has been written, seeing in module the capability to make batbox more efficient and more flexible, resulting in version 5.x. This new implementation allows for new features such as setting environment variable in the parent interpretor.


Batbox is provided under the GNU GPL license, copyrighted 2018 by Romain Garbi. Older versions are also licensed under the 3-clause BSD license.

Batbox uses libpBat which code includes portions of darkbox by Teddy Astie.