Some commands are particularly suited to batch file processing. Each command is explained in detail in the Command Reference. Here is a list of some of the commands you might find most useful:

 

ACTIVATE

activates another window

BEEP

produces a sound of any pitch and duration through the computer's speaker

BREAKPOINT

set a breakpoint in the batch debugger

CALL

executes one batch file from within another

CANCEL

terminates all batch file processing

CLS

clears the TCC window

COLOR

sets the TCC display colors

DEBUGSTRING

send text to the debugger

DEFER

defers a command until the batch file ends

DO

starts a loop. The loop can be based on a counter, or on a conditional expression, strings, or files. ENDDO terminates the loop

DRAWBOX

draws a box on the screen

DRAWHLINE

draws horizontal lines on the screen

DRAWVLINE

draws vertical lines on the screen

ECHO

sends text to the standard output device

ECHOS

sends text to the standard output device

ECHOERR

sends text to the standard error device

ECHOSERR

sends text to the standard error device

ENDLOCAL

restores the settings that were saved and allows specific variables to be exported (see SETLOCAL)

ENDTEXT

ends the block of text started with TEXT

EVENTLOG

writes a string to the Windows application event log

FOR

executes commands for each file that matches a set of wildcards, or each entry in a list

GOSUB

executes a subroutine inside a batch file (see RETURN).

GOTO

branches to a different location in the batch file

IF

IFF

execute commands based on a conditional expression

INKEY

collects keyboard input and store it in environment variables

INPUT

collects keyboard input and store it in environment variables

JABBER

send an instant message (IM)

KEYSTACK

sends keystrokes to applications

LOADBTM

changes the batch file operating mode

LOCAL

define variables local to a library function or batch file

MSGBOX

displays a dialog box with standard buttons like Yes, No, OK, and Cancel, and returns the user's selection

ON

initializes error handling for Ctrl-C / Ctrl-Break, or for program and command errors

OSD

Display floating text on the desktop

PAUSE

displays a message and waits for the user to press a key

PDIR

creates a customized DIR-like display of directory contents

PLAYAVI

plays Windows .AVI files

PLAYSOUND

plays Windows sound files

POSTMSG

send a message to a window

QUERYBOX

displays a dialog box for text input

QUIT

ends the current batch file and optionally returns an exit code

REM

places a remark in a batch file

RETURN

terminates a subroutine (see GOSUB)

SCREEN

positions the cursor on the screen and optionally prints a message at the new location

SCRPUT

displays a message in color

SENDMAIL

sends an email message

SETLOCAL

saves the current disk drive, default directory, environment, alias list, and special character settings (see ENDLOCAL).

SHIFT

changes the numbering of the batch file parameters

SMPP

sends messages using the SMPP protocol

SNPP

sends a message to an alphanumeric pager

START

starts another session or window

SWITCH

selects a group of statements to execute based on the value of a variable

TEXT

displays a block of text (see ENDTEXT)

TIMER

starts or reads a stopwatch

TITLE

changes the window title

VSCRPUT

displays a vertical message in color

WMIQUERY

Query the Windows Management Instrumentation interface

WMIRUN

Run WMI methods on local or remote machines

 

These commands, along with the internal variables and variable functions, make the enhanced batch file language extremely powerful.

 

These commands, along with the internal variables and variable functions, make the enhanced batch file language extremely powerful.