Command Prompt for Windows




MACRO Examples

Example 1:

To create a command LS, which will display a sorted directory listing in lower case letters and in wide format, enter at the command prompt :-

MACRO  LS=DIR  /OWL  $*

To display all .EXE files, enter at the command prompt :-

LS  *.EXE

Example 2:

To alter the DIR command to display a sorted directory listing, enter at the command prompt :-

MACRO  DIR=DIR  /O  $*

Example 3:

To create a command to locate a file by its file description only, enter at the command prompt :-

MACRO WHEREIS=FIND  \*.ION "$*"  /S

To locate all the External Commands, enter at the command prompt :-

WHEREIS EXTERNAL COMMAND

Example 4:

To create a command to execute an original internal CMD.EXE command, enter at the command prompt :-

MACRO  ORIG=CMD.EXE  /C  $*

To redirect the CMD.EXE DIR command into a file called TEMP.TXT, enter at the command prompt :-

ORIG DIR > TEMP.TXT

Example 5:

To delete the macro ORIG, enter at the command prompt :-

MACRO  /D  ORIG