Batch File Tips for DOS/Windows

Current .bat File Directory (Ends with \): %~dp0

Don’t display command: @

Don’t display all commands and outputs: @ECHO OFF

Comment line: REM

Wait for enter key: PAUSE

Parameters:

%0 is the program name as it was called,
%1 is the first command line parameter,
%2 is the second command line parameter,
and so on till %9.

Advertisements

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 )

Google+ photo

You are commenting using your Google+ 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 )

Connecting to %s