windows batch file tips

using batch parameter

@echo off
sublime_text.exe %1

hide output and output only the stuff you want to reveal


@echo off
echo verbose stuff 1
echo verbose stuff 2
echo verbose stuff 3
echo important stuff! >&2
echo verbose stuff 4

launch an exe file asynchronously

By default, scripts run synchronously. What it means is that when you launch an exe file, the batch file doesn’t go on running until you close the program, and it is quite annoying.

So, use “start” command to run steps asynchrounously.

start sublime_text.exe %1