Command Reference (CMD/4OS/2)

About Command reference

The Command Line

Command-Line Editing

Command History and Recall

Command History Window

Command Names and Parameters

Filename Completion

Automatic Directory Changes

Directory History Window

Local and Global Directory History

Multiple Commands

Expanding and Disabling Aliases

Command Line Help

Command-Line Length Limits

File Selection

Extended Parent Directory Names

Wildcards

Ranges

Date, Time, and Size Ranges

Date Ranges

Time Ranges

Size Ranges

File Exclusion Ranges

Multiple Filenames

Include Lists

Executable Extensions

Directory Navigation

Extended Directory Searches

CDPATH

Other Features

Page and File Prompts

Redirection and Piping

Redirection

Piping

Using the Keystack

Waiting for Applications to Finish

Critical Errors

Conditional Commands

Command Grouping

Escape Character

Internal Commands

? - List the internal commands

ACTIVATE - Activate a window

ALIAS - Create or display aliases

ATTRIB - Change or view file attributes

BEEP - Beep the speaker

CALL - Execute one batch file from another

CANCEL - Terminate batch file processing

CD - Change the current directory

CDD - Change the current drive and directory

CHCP - Change the current code page

CLS - Clear the screen

COLOR - Change the display colors

COPY - Copy files

DATE - Change the system date

DEL - Delete one or more files

DELAY - Pause for a specified length of time

DESCRIBE - Create or modify file descriptions

DETACH - Start a program in detached mode

DIR - Display directories

DIRHISTORY - Display, read, or modify the directory history list

DIRS - Display the directory stack

DO - Create loops in batch files

DPATH - Set the data search path

DRAWBOX - Draw a box

DRAWHLINE - Draw a horizontal line

DRAWVLINE - Draw a vertical line

ECHO and :internal:echo|ECHOERR]] - Display a message / set echo state

ECHOS and :internal:echos|ECHOSERR]] - Display a message without CR/LF

ENDLOCAL - Restore the saved environment

ESET - Edit environment variables and aliases

EXCEPT - Exclude files from a command

EXIT - Exit CMD.EXE

FFIND - Search for files

FOR - Repeat a command

FREE - Display total and free disk space

GLOBAL - Execute a command all subdirectories

GOSUB - Execute a subroutine in a batch file

GOTO - Branch within a batch file

HELP - Display help

HISTORY - Manage the history list

IF - Execute a command if a condition is true

IFF - IF / THEN / ELSE conditional command execution

INKEY - Get a character from the keyboard

INPUT - Get a string from the keyboard

KEYBD - Set the keyboard toggles

KEYS - Enable or disable the history list

KEYSTACK - Feed keystrokes to a program or command

LIST - Display a file

LOADBTM - Switch a batch file's mode

LOG - Save a log of commands

MD - Create a subdirectory

MEMORY - Display memory statistics

MOVE - Move files

ON - Handle Ctrl-Break and errors in batch files

OPTION - Modify the command processor configuration

PATH - Set the executable file search path

PAUSE - Suspend batch file or alias execution

POPD - Restore the disk drive and directory

PROMPT - Change the command-line prompt

PUSHD - Save the disk drive and directory

QUIT - Terminate a batch file

RD - Remove subdirectories

REBOOT - Reboot the system

REM - Put a comment in a batch file

REN - Rename files or subdirectories

RETURN - Return from a subroutine in a batch file

SCREEN - Position the cursor and display text

SCRPUT - Display text in color

SELECT - Select files for a command

SET - Create or modify environment variables

SETDOS - Set the CMD.EXE configuration

SETLOCAL - Save the environment

SHIFT - Shift batch file parameters

SHRALIAS - Load or unload SHRALIAS.EXE

START - Start a program in another session

SWITCH - Select commands based on a value

TEE - “Tee” pipe fitting

TEXT - Display text in a batch file

TIME - Set the system time

TIMER - Start or stop a stopwatch

TITLE - Window title

TOUCH - Change date and time stamps

TREE - Directory tree

TYPE - Display file(s)

UNALIAS - Remove aliases

UNSET - Remove environment variables

VER - Display the CMD.EXE and OS/2 version

VERIFY - Enable or disable disk write verification

VOL - Display disk volume labels

VSCRPUT - Display text vertically and in color

WINDOW - Change the window state or title

Y - “Y” pipe fitting

External Commands

Aliases

Batch Files

.BAT, .CMD, and .BTM Files

Echoing in Batch Files

Batch File Parameters

Using Environment Variables

Batch File Commands

Interrupting a Batch File

Automatic Batch Files

Detecting CMD.EXE

Using Aliases in Batch Files

Debugging Batch Files

Batch File String Processing

Batch File Line Continuation

Batch File Compression

Special Character Compatibility

Command Parsing

Argument Quoting

REXX Support

EXTPROC Support

Environment Variables and Functions

CDPATH

cmdline

COLORDIR

COMSPEC

FILECOMPLETION

PATH

PATHEXT

PROMPT

Internal Variables

?

_?

=

+

_4VER

_ANSI

_APMAC

_APMBATT

_APMLIFE

_BATCH

_BATCHLINE

_BATCHNAME

_BG

_BOOT

_CI

_CMDPROC

_CO

_CODEPAGE

_COLUMN

_COLUMNS

_COUNTRY

_CPU

_CWD

_CWDS

_CWP

_CWPS

_DATE

_DAY

_DISK

_DNAME

_DOS

_DOSVER

_DOW

_DOWI

_DOY

_FG

_HLOGFILE

_HOUR

_KBHIT

_LASTDISK

_LOGFILE

_MINUTE

_MONITOR

_MONTH

_MOUSE

_NDP

_PID

_PIPE

_PPID

_PTYPE

_ROW

_ROWS

_SECOND

_SHELL

_SID

_SYSERR

_TIME

_TRANSIENT

_VIDEO

_WINTITLE

_XPIXELS

_YEAR

_YPIXELS

Variable Functions

@ALIAS

@ASCII

@ATTRIB

@CDROM

@CHAR

@CLIP

@COMMA

@CONVERT

@DATE

@DAY

@DEC

@DESCRIPT

@DEVICE

@DISKFREE

@DISKTOTAL

@DISKUSED

@DOSMEM

@DOW

@DOWI

@DOY

@EAREAD

@EAWRITE

@EVAL

@EXEC

@EXECSTR

@EXETYPE

@EXPAND

@EXT

@FILEAGE

@FILECLOSE

@FILEDATE

@FILENAME

@FILEOPEN

@FILEREAD

@FILES

@FILESEEK

@FILESEEKL

@FILESIZE

@FILETIME

@FILEWRITE

@FILEWRITEB

@FINDCLOSE

@FINDFIRST

@FINDNEXT

@FORMAT

@FSTYPE

@FULL

@IF

@INC

@INDEX

@INSERT

@INSTR

@INT

@LABEL

@LEFT

@LEN

@LINE

@LINES

@LOWER

@MAKEAGE

@MAKEDATE

@MAKETIME

@MONTH

@NAME

@NUMERIC

@PATH

@RANDOM

@READSCR

@READY

@REMOTE

@REMOVABLE

@REPEAT

@REPLACE

@REXX

@RIGHT

@SEARCH

@SELECT

@STRIP

@SUBSTR

@TIME

@TIMER

@TRIM

@UNIQUE

@UPPER

@WILD

@WORD

@WORDS

@YEAR

CMD.INI

Modifying the .INI File

Using the .INI File

.INI File Sections

.INI File Directives

Initialization Directives

4StartPath

DirHistory (directive)

DuplicateBugs

HelpBook

History (directive)

INIQuery

LocalAliases

LocalDirHistory

LocalHistory

PauseOnError

SwapFilePath

TreePath

WindowState

WindowX, WindowY, WindowWidth, WindowHeight

Configuration Directives

AmPm

AppendToDir

BatchEcho

BeepFreq

BeepLength

CDDWinLeft, CDDWinTop, CDDWinWidth, CDDWinHeight

CommandSep

CursorIns

CursorOver

DecimalChar

DescriptionMax

DescriptionName

Descriptions

EditMode

EscapeChar

EvalMax

EvalMin

ExecWait

FileCompletion

FuzzyCD

HistCopy

HistLogName

HistMin

HistMove

HistWrap

LineInput

ListRowStart

LogName

NoClobber

ParameterChar

PathExt

PopupWinLeft, PopupWinTop, PopupWinWidth, PopupWinHeight

Printer

ScreenRows

TabStops

ThousandsChar

UnixPaths

UpperCase

Color Directives

BrightBG

CDDWinColors

ColorDir

InputColors

ListboxBarColors

ListColors

ListStatBarColors

PopupWinColors

SelectColors

SelectStatBarColors

StdColors

Key Mapping Directives

General Input Keys

Backspace

BeginLine

Del

DelToBeginning

DelToEnd

DelWordLeft

DelWordRight

Down

EndLine

EraseLine

ExecLine

Ins

Left

NormalKey

Right

Up

WordLeft

WordRight

Command-Line Editing Keys

AddFile

AliasExpand

CommandEscape

DelHistory

EndHistory

Help

LineToEnd

NextFile

NextHistory

NormalEditKey

PopFile

PrevFile

PrevHistory

SaveHistory

Popup Window Keys

DirWinOpen

HistWinOpen

NormalPopupKey

PopupWinBegin

PopupWinDel

PopupWinEdit

PopupWinEnd

PopupWinExec

LIST Keys

ListExit

ListFind

ListFindReverse

ListHex

ListHighBit

ListInfo

ListNext

ListPrevious

ListPrint

ListWrap

NormalListKey

Advanced Directives

ClearKeyMap

Debug

Include

NextINIFile

.INI File Examples

Setup and Troubleshooting

Starting CMD.EXE

The CMD.EXE Help System

Error Messages

Troubleshooting, Service, and Support

Technical Support

Contacting JP Software

What's New?

General Features and Enhancements

Command Line Editing

Command Changes

Variables and Functions

Startup and Configuration

Technical and Compatibility Enhancements

Bugs Fixed

Reference Information

File Systems and File Name Conventions

Drives and Volumes

File Systems

Directories and Subdirectories

File Names

File Attributes and Time Stamps

Miscellaneous Reference Information

Colors and Color Names

Keys and Key Names

Popup Windows

Executable Files and File Searches

Reference Tables

ASCII Table

Key Codes and Scan Codes Table

Key Codes and Scan Codes Explanation

ANSI Codes

Glossary

Glossary - 4

Glossary - A

Glossary - B

Glossary - C

Glossary - D

Glossary - E

Glossary - F

Glossary - G

Glossary - H

Glossary - I

Glossary - K

Glossary - L

Glossary - M

Glossary - N

Glossary - O

Glossary - P

Glossary - R

Glossary - S

Glossary - T

Glossary - U

Glossary - V

Glossary - W

Glossary - X

Created using Inf-PHP v.1 © 2003 Yuri Prokushev

Created using Inf-HTML v.0.9b © 1995 :Peter Childs|http://www.apanix.apana.org.au/~pjchilds]]