Batch, Developer Tool, Programming

In2Batch – Store Anything in a Batch File [Developer Tool]

Often you might need to call files from within your batch script. Whether it’s an executable, settings file, or even another batch file, it can be frusterating to have to include a bunch of files whenever you send your script.

In2Batch works to solve this issue. By using the built in Windows tool called certutil, In2Batch converts any file into a batch script you can include within your batch file. Here’s a video and a description of how it works:

1. Convert the file
Let’s say you want to include a small picture of a cat in your batch file:
call In2Batch.bat cat.png
This will create and open a text file with your batch script. This script checks to see if the file exists, and if it doesn’t, it creates it! You can put this script anywhere in your batch file as long as it runs before you might need the picture.

There are a couple of other parameters you can play with. You can perform the conversion silently (useful if you are using this tool in a script) so that it doesn’t display the completed script. You can also make a script that puts the file in your %temp% folder instead of your current directory, and finally, you can copy the completed script to your clipboard. Here’s the help file:

in2batch /h

To Download In2Batch, check out the releases page on GitHub or view the code directly. Also check out the depreciated version one copy called Into-batch.

Note: In2Batch uses a portable executable called Addecho.exe. The executable adds new lines much faster than batch could. The program was custom made and checked to make sure it was 100% clean. Generated scripts do not use this tool.

8 thoughts on “In2Batch – Store Anything in a Batch File [Developer Tool]

Leave a Reply