Sublime Forum

Using the Build system for batch files

#1

Anyone got a .sublime-build file for batch scripts? What I’m looking for is a way to develop the batch files in sublime, run them by hitting F7, and capture their output in the output window.

Unlike most scripting scenarios, batch files don’t need an interpreter; this means there’s no natural candidate for the first line of the file;

build # WHAT GOES HERE?
lineNumberRegex ^(...*?):([0-9]*):?([0-9]*)
showWhenFinished true
workingDir $ProjectDir

Anyone know how I can get this working?

0 Likes

#2

You can pass the .bat file to cmd.exe to have it run it, so the value you’re looking for should be something along the lines of cmd /c “$File”

0 Likes