windows batch file tips

using batch parameter

@echo off
sublime_text.exe %1

hide output and output only the stuff you want to reveal

from http://stackoverflow.com/questions/2044882/how-to-hide-batch-output

@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
windows batch file tips

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s