home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Liren Large Software Subsidy 16
/
16.iso
/
t
/
t100
/
4.ddi
/
HELPARC.EXE
/
NDOS.HLP
(
.txt
)
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
NeXTSTEP
RISC OS/Acorn
UTF-8
Wrap
Peter Norton Computing Help
|
1991-08-05
|
275.6 KB
|
7,496 lines
PNCIBHDMK
About NDOS
-HELP- About NDOS Help
-EDITING- Command Line Editing
-VARS- NDOS Environment Variables
-FUNCS- NDOS Variable Functions
-ANSI- ANSI Console Driver
? Display NDOS Commands NDOS
ALIAS Assign substitute command names NDOS
ATTRIB View or change file attributes NDOS
BEEP Make a noise NDOS
BREAK Control-Break checking NDOS
CALL Call a batch file NDOS
CANCEL Terminate batch file processing NDOS
CD Change directory NDOS
CDD Change drive and directory NDOS
CHCP Change Code Page NDOS
CHDIR Change directory NDOS
CLS Clear the screen NDOS
COLOR Set the screen colors NDOS
COPY Copy files NDOS
CTTY Change console device NDOS
DATE Show or set the date NDOS
DEL Erase files NDOS
DELAY Pause for a specified time NDOS
DESCRIBE Add descriptions to files NDOS
DIR Display list of files NDOS
DIRS Display the directory stack NDOS
DRAWBOX Draw a box NDOS
DRAWHLINE Draw a horizontal line NDOS
DRAWVLINE Draw a vertical line NDOS
ECHO Display a message NDOS
ENDLOCAL Restore saved environment NDOS
ERASE Erase files NDOS
ESET Edit environment variables NDOS
EXCEPT Exclude files from command NDOS
EXIT Exit secondary command processor NDOS
FOR Repeat a command NDOS
FREE Display disk space usage NDOS
GLOBAL Execute command on directory tree NDOS
GOSUB Call a batch file subroutine NDOS
GOTO Goto a batch file label NDOS
HISTORY Command history list NDOS
IF Conditional command execution NDOS
IFF Conditional command execution NDOS
INKEY Wait for a key NDOS
INPUT Wait for user input NDOS
KEYSTACK Feed keystrokes to a program NDOS
LH Load a program in high DOS memory NDOS
LIST Display a file with scrolling NDOS
LOADBTM Switch batch file .BTM mode NDOS
LOADHIGH Load a program in high DOS memory NDOS
LOG Save command log to a file NDOS
MD Make a directory NDOS
MEMORY Display memory usage NDOS
MKDIR Make a directory NDOS
MOVE Move a file NDOS
NDOS Secondary command shell NDOS
PATH Display or create the program path NDOS
PAUSE "Press a key when ready..." NDOS
POPD Change to directory on top of stack NDOS
PROMPT Change the command line prompt NDOS
PUSHD Add the current directory to stack NDOS
QUIT Terminate the current batch file NDOS
RD Remove a directory NDOS
REM Put a remark in a batch file NDOS
REN Rename a file NDOS
RENAME Rename a file NDOS
RETURN Return for batch file GOSUB NDOS
RMDIR Remove a directory NDOS
SCREEN Position cursor on screen NDOS
SCRPUT Display message at specific location NDOS
SELECT Execute command on selected files NDOS
SET Set an environment variable NDOS
SETDOS Set NDOS configuration variables NDOS
SETLOCAL Save the current environment NDOS
SHIFT Shift batch file variables NDOS
SWAPPING Control NDOS swapping state NDOS
TEE Copy input to output device and file NDOS
TEXT Display a block of text NDOS
TIME Show or set the time NDOS
TIMER Control system stopwatch NDOS
TYPE Type a file to the console NDOS
UNALIAS Remove an alias from the list NDOS
UNSET Remove an environment variable NDOS
VER Display the NDOS and DOS versions NDOS
VERIFY Control disk write verification NDOS
VOL Display disk volume labels NDOS
Y Copy input, then files to output NDOS
BE command Norton Batch Enhancer commands NDOS
BE ASK Wait for a specified keypress NDOS
BE BEEP Beep the speaker NDOS
BE BOX Draw a box on the screen NDOS
BE CLS Clear the screen (and specify color) NDOS
BE DELAY Pause processing NDOS
BE EXIT Exit BE script file Norton
BE GOTO Goto label Norton
BE JUMP Conditional branching Norton
BE MONTHDAY Determine the day of the month NDOS
BE PRINTCHAR Display a character NDOS
BE REBOOT Reboot the computer NDOS
BE ROWCOL Position the cursor NDOS
BE SA Control colors and attributes NDOS
BE SHIFTSTATE Return the keyboard status NDOS
BE TRIGGER Halt until a specified time NDOS
BE WEEKDAY Return the day of the week NDOS
BE WINDOW Draw a solid rectangle NDOS
APPEND Set search path for data files MS-DOS
ASSIGN Assign alternate drive letter MS-DOS
BACKUP Backup files MS-DOS
CHKDSK Check and report on disk information MS-DOS
COMMAND Command processor MS-DOS
COMP Compare files MS-DOS
DEBUG Program debugger MS-DOS
DISKCOMP Compare disks MS-DOS
DISKCOPY Copy disks MS-DOS
DOSKEY DOS command history MS-DOS
DOSSHELL Graphical interface for DOS MS-DOS
EDIT Full screen text editor MS-DOS
EDLIN Line Editor MS-DOS
EMM386 Expanded memory manager MS-DOS
EXE2BIN Convert .EXE files to binary format MS-DOS
EXPAND Expand compressed files MS-DOS
FASTOPEN Keep open file information in memory MS-DOS
FC File comparison MS-DOS
FDISK Configure a hard disk MS-DOS
FIND Search for a text string in files MS-DOS
FORMAT Format a disk MS-DOS
GRAFTABL Load graphics-mode characters (CGA) MS-DOS
GRAPHICS Enable printing of graphics screens MS-DOS
JOIN Connect a drive/directory to another MS-DOS
KEYB Change keyboard to non-U.S. MS-DOS
LABEL Display or change disk volume label MS-DOS
MEM Display memory usage MS-DOS
MIRROR Record disk information MS-DOS
MODE Control device operations MS-DOS
MORE Pause output at screen-full MS-DOS
NLSFUNC National Language Support MS-DOS
PRINT Queue files for printing MS-DOS
QBASIC BASIC programming MS-DOS
RECOVER Recover a file with bad sector MS-DOS
REPLACE Replace files with different ones MS-DOS
RESTORE Restore a backup MS-DOS
SETVER Set DOS version number MS-DOS
SHARE Support for network file sharing MS-DOS
SORT Sort text lines MS-DOS
SUBST Substitute a drive for a path MS-DOS
SYS Load system files to a disk MS-DOS
TREE Display directory tree MS-DOS
UNDELETE Recover deleted or erased files. MS-DOS
XCOPY Extended file copying MS-DOS
CALIBRAT Calibrate a hard disk Norton
DE Disk Editor Norton
DISKEDIT Disk Editor Norton
DISKMON Disk Monitor Norton
DISKREET Data Security Norton
DISKTOOL Disk Tools Norton
DS Directory Sort Norton
EP Erase Protect Norton
FA File Attributes Norton
FD File Date Norton
FF File Find Norton
FILEFIND File Find Norton
FILEFIX File Fix Norton
FL File Locate Norton
FS File Size Norton
IMAGE Image Norton
LP Line Print Norton
NCACHE Norton Cache Norton
NCC Norton Control Center Norton
NCD Norton Change Directory Norton
NDD Norton Disk Doctor Norton
NORTON Norton Utilities Norton
SD Speed Disk Norton
SF Safe Format Norton
SFORMAT Safe Format Norton
SI System Information Norton
SPEEDISK Speed Disk Norton
SYSINFO System Information Norton
TS Text Search Norton
UNERASE UnErase Norton
UNFORMAT UnFormat a disk Norton
WIPEINFO Wipe Information Norton
DOS, the disk operating system, is composed of a number of
program files, three of which make up the core. For MS-DOS
these are named IO.SYS, MSDOS.SYS, and COMMAND.COM.
(PC-DOS calls them IBMBIO.COM, IBMDOS.COM, and COMMAND.COM.)
The first two programs control computer operations; the third,
COMMAND.COM, issues prompts to the user, interprets commands,
loads and executes programs, and interprets batch files.
COMMAND.COM is the default command processor whenever the
computer is booted.
NDOS replaces COMMAND.COM, the command interpreter that comes
with all versions of MS-DOS and PC-DOS.
You'll find NDOS provides a wide variety of capabilities
COMMAND.COM can't, ranging from a vastly enhanced DIR command,
to point-and-shoot file selection for any command, to the
ability to completely redefine your system's commands.
Yet NDOS is fully compatible with COMMAND.COM.
NDOS is a "DOS shell" (a program that gives you access to DOS
functions and commands), but it's unlike most DOS shells on
the market. Virtually all of these other shells are designed
to isolate the novice user from the DOS command line. NDOS,
on the other hand, is intended to make DOS easier to use and
to make you more productive while working at the command line.
It provides enhancements to most of the DOS commands, as well
as more than 40 new commands. These improvements make NDOS a
much richer and more powerful working environment than
COMMAND.COM, without sacrificing the compatibility,
flexibility and control you get from working at the command
line.
Copyright 1991 by Symantec Corporation
All Rights Reserved.
Portions Copyright 1988 - 1991 by
Rex C. Conn and J.P. Software Incorporated
All Rights Reserved.
Use ^r^C19^r ^r^C18^r ^rPgDn^r ^rPgUp^r to scroll through this help entry.
^bNote:^b For quick help at the command line
a brief screen
displaying the correct syntax and switches for a particular
command
enter
^uc:\>^u ^bcommand /?^b
where command is the command of interest.
This online help system for NDOS includes all NDOS internal
commands, the DOS external commands, and the Norton Utilities.
MS-DOS 5.0 is the baseline version used to describe the
external DOS commands. Because MS-DOS and PC-DOS are
essentially the same from the command line, the term "DOS"
refers to both MS-DOS and PC-DOS throughout.
Continue through this help entry for information on the
following topics:
^b^C07^b How To Get Help
^b^C07^b The Index to Help Topics
^b^C07^b The Help Screen
^b^C07^b Conventions Used for Command Syntax
^b^C07^b Definitions of Recurring Elements
^bHow To Get Help^b
Press the ^rF1^r key at any time in NDOS to bring up this help
system. If there is a command already entered on the command
line, the entry for that command is displayed. If not, the
help index is presented. Alternatively, you can enter
^uc:\>^u ^bHELP [command]^b
to bring up the help system (the command parameter is
optional).
^bThe Index to Help Topics^b
Help
^bHelp for NDOS^b
The First Topic
^r^C18^r
^bUse^b ^r^C18^r ^band^b ^r^C19^r
^r The Second Topic
^bto scroll the^b
And So Forth
^blist.^b
And So On
^r^C19^r
^b[^b ^uH^u^belp^b ^b]^b
[ ^uC^uancel ]
^b^C1e^b
^b^C1e^b
^r H ^r ^bor^b ^rEnter^r ^bexpand
^r C ^r ^bor^b ^rEsc^r ^bto get^b
^bthe highlighted topic.^b
^bback to the program^b.
^bNote:^b on a monochrome display, the highlighted pushbutton
will look like [^C10 Help ^C11]. The "Button arrows" can be chosen
for any display as a configuration option from the NUCONFIG
program.
^bThe Help Screen^b
Help
^bTitle of This Help Topic^b
The entry is here with syntax,
^r^C18^r
^r^C18^r ^bOn short^b
purpose, comments, examples, and
^btopics that^b
plenty of usage tips.
^bcan't scroll,^b
^bthe scrollbar^b
^blooks like^b
$ ^r^C19^r
^r^C19^r ^bthis.^b
^b[^b ^uN^u^bext^b ^b]^b[ ^uP^urevious ][ ^uT^uopics ][ ^uC^uancel ]
^b^C1e^b
^b^C1e^b
^b^C1e^b
^b^C1e^b
^rEnter^r ^bwill
Press
^rEsc^r ^bis ALWAYS^b
^bactivate the^b
^r P ^r ^bor^b ^r T ^r
^bthe same as^b
^bhighlighted
or point^b
^bselecting^b ^b[Cancel]^b.
^bpushbutton.
and click.^b
The ^b[Next]^b and ^b[Previous]^b buttons let you browse through the
topics sequentially. ^b[Topics]^b gets you back to the help index.
^uFor mouse users:^u If a help entry contains a highlighted
cross-reference to another command, for example
See ^rALIAS^r.
double click on the highlight to jump to the entry for
that command.
^bConventions Used for Command Syntax^b
^bUPPERCASE^b Commands, keywords, and switches are shown in
uppercase and must be entered as shown. (You can,
of course, enter them in lowercase.)
^blowercase^b Parameters that you replace with your own entry,
such as the name of a file, are shown in
lowercase.
^b[ ]^b Square brackets indicate an optional parameter or
switch. The brackets themselves are not entered.
^b|^b The vertical bar means use only one of the options
presented.
.^b The ellipses means you can repeat the preceding
option as many times as necessary.
^bDefinitions of Recurring Elements^b
^bdrive^b The letter designating a hard or floppy drive. A
colon (:) must follow the drive letter.
^bpath^b The directory location.
^bfilename^b The name of a file (including any filename
extension). The wildcard characters (* and ?) can
be used with most filenames.
^bpathname^b Drive, path, and filename. If the drive is
omitted, the default drive is assumed. If the
directory is omitted, the current directory is
assumed.
^bcommand^b Any internal NDOS or external DOS command, batch
file, or other executable program, including its
command line parameters.
^bspace^b A space is used to separate the elements on the
command line. You could also use commas.
^bparameter^b Provides additional information to a command.
Parameters that are replaced with your own entry
are shown in lowercase.
^bswitch^b A command line control option.
^b/^b The forward slash always precedes a switch.
For the ^uNDOS internal commands^u, most applicable
switches can be grouped after a single forward
slash. Or, a separate slash can be placed before
each switch (like DOS). The ^uDOS external commands^u
require a separate slash preceding each switch.
^b The caret is the default character used to
separate multiple commands on a single line. (The
character can be changed by setting the COMPOUND
variable with the ^rSETDOS^r command.)
^b"^b Command line arguments enclosed in double quotes
may contain white space. (See ^uArgument Quoting^u
in the NDOS manual.)
^b`^b Command line arguments enclosed in single back
quotes will not be processed for alias or variable
expansion, or I/O redirection. (See ^uArgument^u
^uQuoting^u and ^uI/O Redirection^u in the NDOS manual.)
^b;^b Commands, such as COPY, LIST, and SELECT, that
take multiple files as an argument for input files
will also accept an ^uinclude list^u. Join the
filenames or file specifications (using * and ?)
on the command line with semicolons and ^bno spaces^b.
Only the first file in an include list can have a
path; subsequent filenames default to the same
path.
For example, copy two groups of files to drive A
and only specify the path once:
^ud:\book>^u ^bcopy c:\wp\text\note*.txt^b;^btr*.doc a:^b
No Spaces
^bCommand Line Editing^b
NDOS provides a 255 character command line, with full editing
capability. The following keys have special meaning (the
caret ^^ means press the Ctrl key together with the specified
key):
^bLeft Arrow^b Move the cursor left one character.
^bRight Arrow^b Move the cursor right one character.
^bUp Arrow^b Recall the previous command from the history
list, or match a partial command entry with
a history list entry.
^bDown Arrow^b Recall the next command from the history
list, or match a partial command entry with
a history list entry.
^b^^Left Arrow^b Move the cursor left one word.
^b^^Right Arrow^b Move the cursor right one word.
^bHome^b Move the cursor to the beginning of the line.
^b^^Home^b Delete from the beginning of the line to
the character preceding the cursor.
^bEnd^b Move the cursor to the end of the line.
^b^^End^b Delete from the cursor to the end of the line.
^bIns^b Toggle between insert and overstrike mode.
^bDel^b Delete the character at the cursor.
^bBackspace^b Delete the character to the left of the
cursor.
^bEnter^b Execute the command.
^bEsc^b Erase the entire line.
^b^^L^b Delete the word to the left of the cursor.
^b^^R^b or ^b^^Bksp^b Delete the word to the right of the cursor.
^b^^C^b Cancel the command.
^b^^D^b Delete the history list entry, erase the
line, and display the previous history entry.
^b^^K^b Save the command to the history list without
executing it, and erase the line.
^bF1^b Call the on-line help.
^bF3^b Repeat or complete the previous line from the
history list (as in COMMAND.COM).
^bAlt-255^b (Hold down the ^bAlt^b key and enter ^b255^b on the
numeric keypad.) Accept the next character
"as-is" from the keyboard and enter it on the
command line. This allows you to enter
characters normally interpreted as NDOS editing
keys (for example, ^bEsc^b). To enter the Alt-255
character itself into the line, you must type it
twice.
^bFilename Completion^b
^bF9^b or ^bTab^b An ^bF9^b or ^bTab^b will scan the filename
(which can include the wildcard characters
* and ?) at or immediately to the left of the
cursor position, and replaces it with the
first matching filename. Pressing ^bF9^b or ^bTab^b
again replaces it with the next matching
filename.
^bF10^b Pressing ^bF10^b appends the next matching
filename at the current cursor position.
^bF8^b or Pressing ^bF8^b or ^bShift-Tab^b will retrieve the
^bShift-Tab^b previous matching filename.
^bF9^b defaults to ^b*.*^b if you don't enter a filename. ^bF9^b appends
a ^b.*^b if you don't enter an extension.
^bEnvironment Variables^b
Environment variables are referenced in a command by starting
the variable name with a percent sign (%). Two percent signs
in a row (%%) signify a percent sign character. An
environment variable name is terminated by either another
percent sign, or by an invalid character (see below). To pass
a variable name (instead of the value) to a command (for
example, in INKEY or INPUT), you must precede it with two
percent signs.
Environment variable names may be composed of any alphanumeric
character, plus the _ (underscore) and $ characters. In
addition to the standard variable name characters, you can
force NDOS to accept any sequence of characters as a valid
variable name by enclosing it them square brackets. For
example, ^b%[AB##1]^b refers to an environment variable named
AB##1.
There are some variable names that have special meanings in
NDOS. Only CMDLINE, DIRCMD, PATH and TEMP are actually stored
in the environment; the remainder are internal to NDOS, and
cannot be viewed or modified with SET or ESET. (The internal
variable names are checked after variable expansion, so they
can be overridden by creating an environment variable of the
same name.)
^b#^b returns the number of command line arguments in a batch
file. ^b%#^b only works in batch files, not aliases.
^b?^b returns the exit code of the last external program.
This allows you to save an exit code in another variable
and then process it later, or to see what a program is
actually returning.
^bCMDLINE^b is the fully expanded 255-character command line.
You can access it from an external program by searching
the environment.
^bDIRCMD^b is the default format for the DIR command. You can
set it to any valid combination of DIR switches.
^bPATH^b tells NDOS where to search for executable files
(.COM, .EXE, .BTM and .BAT) not in the current
directory. Some applications also use the PATH variable
to find their files.
^bTEMP^b specifies where NDOS should put the temporary pipe
files (see Redirection in the NDOS manual).
^b_BG^b is the screen background color at the current cursor
position (returned as a three-character string).
^b_COLUMNS^b is the current number of screen columns.
^b_CPU^b is the cpu type, returned as a string:
86 8086 and 8088
186 80186 and 80188
200 NEC V20 and V30
286 80286
386 80386 and 80486
^b_CWD^b is the current directory in the format d:\pathname.
^b_CWDS^b has the same value as CWD, except it ensures the
pathname ends in a backslash (\).
^b_CWP^b is the current directory in the format \pathname.
^b_CWPS^b has the same value as CWP, except it ensures the
pathname ends in a backslash (\).
^b_DATE^b contains the current system date, in the format
mm-dd-yy (U.S.), dd-mm-yy (Europe), or yy-mm-dd (Japan).
^b_DISK^b is the current disk (for example, C).
^b_DOSVER^b is the current DOS version (for example, 3.3).
^b_DOW^b is the current day (Mon, Tue, Wed, etc.).
^b_FG^b is the screen foreground color at the current cursor
position (returned as a three-character string).
^b_MONITOR^b returns MONO or COLOR for monitor type.
^b_NDP^b is the coprocessor type, returned as a string:
0 no coprocessor is installed
087 8087
287 80287
387 80387 or 80486
^b_ROWS^b is the current number of screen rows.
^b_SHELL^b is the current shell nesting level (in swapping
mode). The root shell is 0. If you are not in swapping
mode, _SHELL returns 99.
^b_TIME^b contains the current system time in the format
hh:mm:ss. The separator character may vary depending
depending upon your country information. (See ^rCHCP^r.)
^b_VIDEO^b returns MONO, CGA, EGA, or VGA for the video
card type.
^bVariable Functions^b
Variable Functions are pseudo-variables which take one or
more arguments (which can be environment variables or
variable functions themselves), and return a value.
Like all environment variables, when used they must be
preceded by a % sign (%@eval, %@len, and so on). All variable
functions must have square brackets enclosing their
argument(s).
^b@attrib[filename,RHSDA]^b tests whether the file has the
specified attribute or attributes set. Returns 0 (false)
or 1 (true). Use any combination of R (Read-only),
H (Hidden), S (System), D (Directory), A (Archive) or
N (No attributes set).
^b@diskfree[drive:,B|K|M]^b returns the free disk space on
the specified drive. Specify B(ytes), K(ilobytes) or
M(egabytes).
^b@dosmem[B|K|M]^b returns the amount of free DOS memory.
Specify B(ytes), K(ilobytes) or M(egabytes).
^b@ems[B|K|M]^b returns the amount of free expanded memory.
Specify B(ytes), K(ilobytes) or M(egabytes).
^b@eval[expression]^b evaluates an arithmetic expression. It
supports addition (+), subtraction (-), multiplication
(*), division (/), and modulo (%%). The expression can
contain environment variables, including other variable
functions. The elements of the expression and the
result are always whole numbers (no decimals) in the
range -2,147,483,648 to +2,147,483,647. For example, if
the value of the variable "a" is 5, then
^b%@eval[(%a*4)-2]^b would return ^b18^b.
^b@ext[filename]^b returns the file extension (without a
leading period).
^b@extended[B|K|M]^b returns the amount of free extended
memory. Specify B(ytes), K(ilobytes) or M(egabytes).
^b@filesize[filename,B|K|M]^b returns the size of the
file. Specify B(ytes), K(ilobytes) or M(egabytes).
^b@full[filename]^b returns the fully qualified path name.
^b@index[string1,string2]^b returns the position of string2
within string1, or -1 if string2 is not found. The
first position in string1 is numbered 0.
^b@len[string]^b returns the length of the string.
^b@line[filename,n]^b returns line "n" from the specified
file.
^b@lower[string]^b returns the string converted to lowercase.
^b@name[filename]^b returns the filename only (no path or
extension).
^b@path[filename]^b returns the path only (including the
trailing backslash).
^b@remote[drive]^b tests if a drive is local or remote.
Returns 0 for local drive or 1 for remote drive.
^b@removable[drive]^b test if a drive is removable.
Returns 0 for not removable or 1 for removable.
^b@search[filename]^b searches for the filename, using the
PATH environment variable, and append an extension
(.COM, .EXE, .BAT, .BTM, or executable extension) if one
wasn't specified.
^b@substr[string,start,length]^b returns a substring, starting
at the position "start" and continuing for "length"
characters. If the length is negative, the start is
relative to the right side. For example,
^b%@substr[%_time,0,2]^b gets the current time and extracts
the hour. If the string includes commas it must be
quoted with double quotes or back-quotes (" or `). The
quotes do count in calculating the position of the
substring to be extracted.
^b@upper[string]^b returns the string converted to uppercase.
^b@xms[B|K|M]^b returns the amount of available XMS 2.0
extended memory. Specify B(ytes), K(ilobytes) or
M(egabytes).
This section is a quick-reference to commonly-used ANSI
commands. This information is generally applicable to the DOS
ANSI.SYS driver as well as other ANSI drivers. See the
documentation for the driver you use for more details.
An ANSI.SYS command string consists of three parts:
^bESC[^b
The ASCII character ESC, followed by a left
bracket. These two characters must be present
in all ANSI strings.
^bparameters^b Optional parameters for the command. If there
are multiple parameters they are separated by
semicolons.
^bcmd^b
A single-letter command. The case of the
letter IS meaningful.
For example, to position the cursor to row 7, column 12 the
ANSI command is:
ESC[7;12H
To transmit ANSI commands to the screen with NDOS, you should
use the ^rECHO^r command. The ESC character can be generated
by inserting it into the string directly (if you are putting
the string in a batch file and your editor will insert such a
character), or by using NDOS's internal "escape" character
(Ctrl-X, appearing as
) followed by a the letter "e" in
lowercase.
For example, the sequence shown above could be transmitted
from a batch file with either of these commands (the first
uses an ESC character directly; the second uses
echo
[7;12H
echo
e[7;12H
You can also include ANSI commands in your prompt, using $e
to transmit the ESC character.
^bNote:^b You cannot use PROMPT to transmit ANSI commands to
the screen from a batch file (see ^rPROMPT^r).
^bCommands^b
Command
Description
ESC[rowsA
Cursor up
ESC[rowsB
Cursor down
ESC[colsC
Cursor right
ESC[colsD
Cursor left
ESC[row;colH
Set cursor position (top left is
row 1, column 1)
ESC[2J
Clear screen
ESC[K
Clear from cursor to end of line
ESC[row;colf
Set cursor position, same as "H"
command
ESC[=modeh
Set display mode; see table of mode
values below
ESC[=model
Set display mode; see table of mode
values below
ESC[attr;attr;
Set display attributes; see table of
attribute values below
ESC[key;string;
.p Substitute "string" for specified
key; see key substitutions below
ESC[s
Save cursor position (may not be
nested)
ESC[u
Restore cursor position after a save
^bDisplay Attributes^b
Attribute
Description
All attributes off (normal white on
black)
High intensity (bold)
Normal intensity
Underline (usually effective only on
monochrome displays)
Blinking
Reverse Video
Invisible
30-37
Set the foreground color:
30=Black 31=Red
32=Green 33=Yellow
34=Blue
35=Magenta 36=Cyan
37=White
40-47
Set the background color, same values as
above but substitute 40 for 30 etc.
Settings are cumulative. To set bright red foreground, for
example, first set all attributes off, then set red, then
bold:
echo
[0;31;1m.
^bDisplay Modes^b
Mode
Description
Text 40x25 monochrome
Text 40x25 color
Text 80x25 monochrome
Text 80x25 color
Graphics 320x200 4-color
Graphics 320x200 4-color
Graphics 640x200 2-color
(cursor wrap kludge)
Mode 7 is an unfortunate kludge; Setting mode 7 with an "h"
command tells ANSI to wrap text to the next line when it
passes the end of a line; setting mode 7 with an "l"
(lowercase L) command tells ANSI not to wrap text. For all
other modes the "h" and "l" commands are equivalent.
^bKey Substitutions^b
The key substitutions ("p" command) causes ANSI to substitute
the text in "string" when the specified key is pressed. The
key code can be a single character in quotes, a numeric ASCII
value, or an extended code for a non-ASCII key (that is,
function or cursor keys) in the form ^b0;n^b where n is the
code for the key.
The string to be substituted can be a single character or
character string in quotes, a numeric ASCII value, or an
extended key code.
Key substitutions set up with ANSI.SYS will be in effect for
NDOS and for any other program which uses DOS to read the
keyboard.
To clear a key substitution, "substitute" the original key for
itself (see examples).
^bExamples^b
Clear the display attributes, then set the display to bright
cyan on blue, and clear the screen:
echo
e[0;44;36;1m
Substitute "dir"<cr> for F4:
echo
e[0;62;"dir";13p
Undo the above substitution:
echo
e[0;62;0;62p
Set up a prompt which saves the cursor position, displays the
NDOS shell level, date, and time on the top line in bright
white on magenta, and then restores the cursor position and
sets the color to bright cyan on blue, and displays the
standard prompt (enter this on one line):
prompt $e[s$e[1;1f$e[0;45;37;1m$e[K($z)
$t$e[u
$e[0;44;36;1m$p$g
^bSYNTAX
(Internal NDOS)^b
^bPURPOSE^b
Display the NDOS internal commands.
^bSYNTAX
(Internal NDOS)^b
ALIAS [/P][/R pathname
.] [name[=][value]]
^bPURPOSE^b
Load or display the alias list, or define name as a substitute
for value.
^bCOMMENTS^b
Aliases are useful as a means of executing a complex series of
commands with a few keystrokes. Aliases can also be used as
in memory batch files, and will run much faster than
disk-based batch files.
If only "name" is specified, ALIAS displays the current alias
value. Otherwise, ALIAS assigns the command(s) in "value" to
name. Name can now be used as if it were a built-in or
external command. If you don't specify any arguments, ALIAS
displays the current alias list.
Name is limited to no more than 80 characters, and value
to no more than 255 characters.
The ALIAS options are:
^b/P^b Pause: Halt display after each screen and wait for
a key to be pressed.
^b/R^b Read: Load an alias list from a file.
Reading aliases from a file is much faster than loading
aliases from a batch file. The file is in the same format as
the ALIAS display, so ALIAS /R can accept as input a file
generated by redirecting ALIAS output. (You can add comments
to an alias file by starting the comment line with a colon.)
For example, the following commands save the aliases to a
file, and then reload them from that file:
alias > alist
alias /r alist
You can load aliases from multiple files by listing the
filenames individually after the /R.
When defining aliases at the command line, back quotes must be
used around the alias arguments that contain multiple
commands or variable references (%2, %&2, etc.) to prevent
premature expansion. Back quotes should NOT be used when
defining aliases in a file to be read with ALIAS /R.
Aliases may be nested; that is, an alias can refer to another
alias, but they cannot refer back to themselves (a=b=a). You
can stop alias expansion by prefacing the alias with an
asterisk (*). This also allows an alias to refer to a
command of the same name (see below for an example).
Alias names can be truncated by including an asterisk (*) in
the name.
To remove an alias, use the ^rUNALIAS^r command.
For more information on aliases (including the use of
variables), see the Aliases section in the NDOS manual, and
the sample file ALIASES distributed with NDOS.
^bEXAMPLES^b
Define D as an alias for DIR /W:
c:\> alias d dir /w
Rename the LIST command to DISPLAY, and alias LIST to an
external program:
c:\> alias display *list
c:\> alias list c:\util\list.com
The following examples show the use of alias arguments:
c:\> alias zap `erase %& ^^ chkdsk ^^ dir /w`
c:\> alias reverse `echo %5 %4 %3 %2 %1`
^bSYNTAX
(Internal NDOS)^b
ATTRIB [/DS] [-|+[AHRS]] [drive:][path]filename
^bPURPOSE^b
Change or display file or subdirectory attributes.
^bCOMMENTS^b
The ATTRIB options are:
^b/D^b Directory: Modify directory attributes.
^b/S^b Subdirectory: Include files in all subdirectories.
^b+A^b Set the archive attribute
^b-A^b Clear the archive attribute
^b+H^b Set the hidden attribute
^b-H^b Clear the hidden attribute
^b+R^b Set the read-only attribute (write-protected)
^b-R^b Clear the read-only attribute
^b+S^b Set the system file attribute
^b-S^b Clear the system file attribute
NDOS will preserve the previous file attributes and change
only the specified attributes. New attribute values are
allowed between filenames; otherwise ATTRIB uses the same
attributes specified for the previous file(s). You cannot
modify the directory or volume label attributes.
ATTRIB with just a file specification, will display all
attributes. You can display files with specified attributes
using the ^b/A^b option in ^rDIR^r.
^bEXAMPLES^b
Set the read-only and hidden attributes for the file MEMO:
c:\> attrib +rh memo
Set the archive attribute (file has been modified) for MEMO
and change TEXT.COM to system and not modified:
c:\> attrib +a memo +s -a test.com
^bSYNTAX
(Internal NDOS)^b
BEEP [frequency duration
^bPURPOSE^b
Beep the speaker.
^bCOMMENTS^b
BEEP is normally used in batch files to signal that an
operation has been completed, or that the computer needs
attention (for example, to change disks). Because BEEP
allows you to specify the frequency and duration, you can use
it to play simple music. You can specify multiple
frequency/duration pairs on the command line.
The frequency is specified in Hertz, and the duration in
1/18th second intervals. No sound will be generated for
frequencies less than 20 Hz, allowing you to insert short
delays. The default value for frequency is 440 Hz; the
default value for duration is 2.
The following table gives the frequency values for a five
octave range (middle C is 523 Hz):
131
262
523
1040
2093
C#/Db
139
277
554
1103
2217
147
294
587
1176
2349
D#/Eb
156
311
622
1241
2489
165
330
659
1311
2637
175
349
698
1391
2794
F#/Gb
185
370
740
1488
2960
196
392
784
1568
3136
G#/Ab
208
415
831
1662
3322
220
440
880
1760
3520
A#/Bb
233
466
932
1866
3729
248
494
988
1973
3951
^bEXAMPLE^b
The following batch file fragment runs the program DEMO, plays
a few notes, and waits for you to press a key:
demo
beep 440 4 587 2 1040 6
pause Finished with the demo, press a key to continue.
^bSYNTAX
(Internal NDOS)^b
BREAK [ON | OFF]
^bPURPOSE^b
Display, enable, or disable extended Ctrl-C or
Ctrl-Break checking.
^bCOMMENTS^b
BREAK turns the extended Ctrl-C or Ctrl-Break checking ON or
OFF. If no argument is given, it displays the current BREAK
status.
If BREAK is off, DOS will only check for a Ctrl-C during DOS
character I/O (screen, keyboard, serial port, or printer
operations). Many programs don't use the DOS functions to
access the screen and keyboard, and it can be difficult to
break out of them with BREAK off. If BREAK is on, DOS will
check for a Ctrl-C or Ctrl-Break during any DOS operation
(including disk I/O).
BREAK defaults to OFF. You can change the default BREAK
setting by adding the following line to your CONFIG.SYS file:
BREAK=ON
^bEXAMPLE^b
Check the current BREAK status:
c:\> break
BREAK is OFF
Enable Ctrl-C checking in all DOS calls:
c:\> break on
^bSYNTAX
(Internal NDOS)^b
CALL pathname
^bPURPOSE^b
Call a secondary batch file.
^bCOMMENTS^b
CALL allows batch files to call other batch files (batch file
nesting) without invoking a secondary copy of the command
processor. NDOS supports batch file nesting up to eight
levels deep. The calling batch file is suspended while the
called batch file runs. When the called batch file finishes,
the calling batch file resumes execution at the next command.
If you execute a batch file from another batch file without
using CALL, the first batch file is terminated before the
second one starts.
The current ECHO state will be inherited by a called batch
file.
See also ^rCANCEL^r and ^rQUIT^r.
^bEXAMPLE^b
The following batch file fragment compares an input line to
"wp" and calls a secondary batch file if it matches:
input Enter your choice: %%option
if "%option" == "wp" call wp.bat
^bSYNTAX
(Internal NDOS)^b
CANCEL
^bPURPOSE^b
Terminate batch processing.
^bCOMMENTS^b
The CANCEL command will end all batch file processing,
regardless of the batch nesting level. (Use QUIT to end a
nested batch file and return to the previous batch file.)
You can CANCEL at any point in a batch file.
See also ^rCALL^r and ^rQUIT^r.
^bEXAMPLE^b
The following batch file fragment compares an input line to
"end" and terminates all batch file processing if it matches:
input Enter your choice: %%option
if "%option" == "end" cancel
^bSYNTAX
(Internal NDOS)^b
CD [drive:][path]
CHDIR [drive:][path]
^bPURPOSE^b
Display or change the current directory.
^bCOMMENTS^b
CD and CHDIR are the same command.
Entering CD with no argument or only a disk drive name will
display the current directory. Entering CD and a pathname
will change the current directory.
Every disk drive on the system has its own current directory.
Specifying both a drive and a directory in the CD command
will change the current directory on the specified drive, but
will not change the default drive. Use CDD to change both
the drive and directory.
To start at the root directory, start the pathname with a
backslash (\). To start at the parent directory, start the
pathname with two periods (..). All other pathnames start at
the current directory.
With NDOS, you can move up the directory tree by adding
additional periods (one per level) after the initial two for
the parent directory. For example,
(three periods) means change to the directory one higher than
the parent directory.
See also ^rCDD^r and ^rPUSHD^r.
^bEXAMPLES^b
Change to the subdirectory C:\FINANCE\MYFILES:
c:\> cd \finance\myfiles
Change the default directory on drive A:
c:\> cd a:\utility
^bSYNTAX
(Internal NDOS)^b
CDD [drive:]path
^bPURPOSE^b
Change the current disk drive and directory.
^bCOMMENTS^b
CDD is similar to CD, except it can also change the default
disk drive.
To start at the root directory, start the pathname with a
backslash (\). To start at the parent directory, start the
pathname with two periods (..). All other pathnames start at
the current directory.
With NDOS, you can move up the directory tree by adding
additional periods (one per level) after the initial two for
the parent directory. For example,
cdd d:
(three periods) means change to the directory one higher than
the parent directory on the D drive.
DOS will not accept a directory name longer than 64
characters.
See also ^rCD^r and ^rPUSHD^r.
^bEXAMPLE^b
Change from the root directory on drive A to the subdirectory
C:\WP:
a:\> cdd c:\wp
^bSYNTAX
(Internal NDOS)^b
CHCP [
^bPURPOSE^b
Display or change the current system code page.
^bCOMMENTS^b
Code page switching allows you to select different character
sets for language support. To use code page switching, you
must have an EGA or VGA board and/or an appropriate printer,
and DOS 3.3 or above.
Before using CHCP, you must load the device drivers (in
CONFIG.SYS); make sure the information file (COUNTRY.SYS) is
available; load national language support (using the NLSFUNC
command); and prepare the specified code page for the devices
(using the MODE command with the CODEPAGE PREPARE option).
CHCP accepts one of the two prepared system code pages. An
error message is displayed if a code page is selected that
has not been prepared for the system.
Entering CHCP with no argument displays the active code page.
See your DOS manual for more information on CHCP and code
page switching.
See also ^rMODE^r and ^rNLSFUNC^r.
^bEXAMPLES^b
Display the current code page:
c:\> chcp
Active code page: 437
Set the code page to multilingual:
c:\> chcp 850
^bSYNTAX
(Internal NDOS)^b
CHDIR [[drive:][pathname]
CD [[drive:][pathname]
^bPURPOSE^b
Display or change the current directory.
^bCOMMENTS^b
CHDIR and CD are the same command.
See ^rCD^r for details.
^bSYNTAX
(Internal NDOS)^b
CLS [[BRIGHT] [BLINK] fg ON bg]
^bPURPOSE^b
Clear the video display, optionally to the specified colors.
^bCOMMENTS^b
CLS clears the display and moves the cursor to the upper left
corner. ^bfg^b is the foreground color, ^bbg^b the background
color. Only the first three characters of the color name and
attributes ("bright" and "blink") are required.
The available colors are:
Black
Blue
Green
Magenta
Cyan
Yellow
White
CLS is normally used in batch files to clear the screen before
displaying text.
See also ^rCOLOR^r.
^bEXAMPLES^b
Clear the display:
c:\> cls
Clear the display to a blue background, and set white
characters as the new default:
c:\> cls white on blue
^bSYNTAX
(Internal NDOS)^b
COLOR [[BRIGHT] [BLINK] fg ON bg]
^bPURPOSE^b
Set the screen display colors.
^bCOMMENTS^b
^bfg^b is the foreground color, ^bbg^b the background color.
Only the first three characters of the color name and
attributes ("bright" and "blink") are required.
The available colors are:
Black
Blue
Green
Magenta
Cyan
Yellow
White
See also ^rCLS^r and ^rSCRPUT^r.
^bEXAMPLE^b
Set the default screen colors to bright white text on a blue
background:
c:\> color bright white on blue
^bSYNTAX
(Internal NDOS)^b
COPY [/MPQRUV] [drive:][path]filename[+]
. [/A][/B]
[[drive:][path]filename][/A][/B]
^bPURPOSE^b
Copy or append one or more files.
^bCOMMENTS^b
Unlike COMMAND.COM, NDOS allows you to copy several unrelated
files to a target directory with a single COPY command. If
there are two or more arguments on the command line, COPY
assumes the last argument is the target. If there is only
one argument, the target is assumed to be the current
directory.
The plus (+) tells NDOS to append two or more files to a
single target file. If you don't specify a target, COPY will
append each subsequent file to the first file.
If you specify more than one source file, and the target is
NOT a directory, COPY will automatically append the files to
the target.
The ^b/A^b(SCII) or ^b/B^b(inary) options apply to the
preceding filename and to all subsequent filenames on the
command line until another /A or /B is entered. The other
options (/M, /P, /Q, /R, /U, /V) apply to all filenames on
the command line.
The COPY options are:
^b/A^b If used with a source filename, NDOS will copy the
file up to, but not including, the first ^^Z character
in the file. If you use /A with a target filename,
NDOS will add a ^^Z to the end of the file. NDOS
defaults to /A when appending files.
^b/B^b If used with a source filename, NDOS will copy the
entire file. Using /B with a target filename prevents
NDOS from adding a ^^Z to the end of the target file.
NDOS defaults to /B for normal file copies.
^b/M^b Modified: Copy only those files with the archive bit
set (see ATTRIB). The archive bit will NOT be cleared
after copying.
^b/P^b Prompt: Confirm each file copy (Y or N). An N response
will skip that particular file.
^b/Q^b Quiet: Don't display filenames as they are copied.
^b/R^b Replace: Prompt before overwriting an existing file.
^b/U^b Update: Copy only those source files that are newer
than a matching target file, or where a matching
target file doesn't exist.
^b/V^b Verify: Make sure that each sector a file is written
to can be read. This is the same as executing the
VERIFY ON command, but is only active during the COPY.
See also ^rMOVE^r, ^rREPLACE^r, and ^rXCOPY^r.
^bEXAMPLES^b
Copy the files MEMO1, PROJECT8.WKS, and UPDATE.BAT to the root
directory on drive A:
c:\> copy memo1 project8.wks a:\
Append the files MEMO1, MEMO2, and MEMO3 and store the result
in BIGMEMO:
c:\> copy memo1+memo2+memo3 bigmemo
Copy only those files in the root directory on drive A that
are newer than the matching files in the current directory,
or which don't exist in the current directory:
c:\> copy /u a:\*.* c:\*.*
Copy files from the root directory on drive A to the current
directory, but prompt before overwriting existing files:
c:\> copy /r a:\*.*
Copy a downloadable font file to the printer in binary mode:
c:\> copy myfont.dat /b lpt1:
^bSYNTAX
(Internal NDOS)^b
CTTY device
^bPURPOSE^b
Change the default console device.
^bCOMMENTS^b
At startup, NDOS uses the keyboard as the standard input
device and the display as the standard output device. CTTY
allows you to change the console (CON:) to another device
that can perform standard character I/O.
CTTY works only for those programs that use the standard
DOS I/O functions (this includes all of the internal NDOS
commands with the exception of DRAWBOX, DRAWHLINE, DRAWVLINE,
LIST, SCREEN, SCRPUT, and SELECT).
^bEXAMPLE^b
Change the console to the first serial port:
c:\> ctty com1:
^bSYNTAX
(Internal NDOS)^b
DATE [date]
^bPURPOSE^b
Display and (optionally) change the system date.
^bCOMMENTS^b
If you don't enter any parameters, DATE will display the
current system date and time, and prompt for the new date.
Press Enter if you don't wish to change the date, otherwise
enter the new date.
The format for the date entry depends on the country code
defined in the CONFIG.SYS file or by the CHCP command. The
default format is U.S. (mm-dd-yy). The European format is
dd-mm-yy; the Japanese is yy-mm-dd.
The parameters for the DATE command are:
^bmm^b
month: 1 to 12
^bdd^b
day:
1 to 31
^byy^b
year: 80 to 99 (1980 to 1
9) or 2
0 to 2099
Enter two, three, or four digits for the year.
You can use hyphens, slashes, or periods to separate the
month, day, and year entries.
See also ^rCHCP^r and ^rTIME^r.
^bEXAMPLES^b
Enter the date from the command line:
c:\> date 12/25/89
To be prompted for the date:
c:\> date
Mon Dec 25, 1989 9:30:06
Enter new date (mm-dd-yy):
^bSYNTAX
(Internal NDOS)^b
DEL [/PQYZ] [drive:][path]filename
ERASE [/PQYZ] [drive:][path]filename
^bPURPOSE^b
Erase the specified file(s) from the disk.
^bCOMMENTS^b
DEL and ERASE are the same command.
The DEL options are:
^b/P^b Prompt: Confirm (Y/N) file deletion for each file.
^b/Q^b Quiet: Don't display filenames as they are deleted.
^b/Y^b Yes: The reverse of ^b/P^b, it assumes a Y response to
everything, including deleting an entire subdirectory.
^b/Z^b Zap: Delete hidden, system, and read-only files also.
^uUse with caution!^u (/Z will defeat the EXCEPT command.)
If you enter a subdirectory name, or a filename composed only
of wildcards (* and/or ?), DEL asks for confirmation (Y or N)
unless you specified the /Y(es) option. If you respond
with a Y, DEL will delete all the files in that subdirectory
(except for hidden, system, and read-only files).
^bEXAMPLE^b
Erase all the files in the current directory with a .BAK or
.PRN extension:
c:\> del *.bak *.prn
^bSYNTAX
(Internal NDOS)^b
DELAY [seconds]
^bPURPOSE^b
Pause for a specified period of time.
^bCOMMENTS^b
DELAY is useful in batch file loops while waiting for a
condition to occur. The default value is one second.
You can cancel a DELAY loop by pressing Ctrl-C.
^bEXAMPLE^b
Wait for 10 seconds:
delay 10
^bSYNTAX
(Internal NDOS)^b
DESCRIBE [drive:][path]filename
. ["description"]
^bPURPOSE^b
Create, modify, or delete file and subdirectory descriptions.
^bCOMMENTS^b
DESCRIBE adds descriptions (up to 40 characters) to DOS
filenames and subdirectories. The descriptions will be
displayed when using DIR with the default single column
option, or when using SELECT.
File descriptions allow you to identify your files in much
more meaningful ways than DOS allows in an eight character
filename.
You can enter a description on the command line by entering
the filename followed by the description enclosed in quotes.
Using wildcards (* and ?) and/or multiple filenames with a
description on the command line will give all matching files
the same description.
Descriptions are stored in each directory in a hidden file
called DESCRIPT.ION. Use the ATTRIB command to "unhide" this
file if you need to copy or delete it.
The description file is modified appropriately whenever you
perform an internal command (such as COPY, DEL, MOVE, or
RENAME), but not if you use an external command (such as
REPLACE, XCOPY, or a "DOS shell").
See also ^rDIR^r and ^rSELECT^r.
^bEXAMPLE^b
Create a description for the file MEMO.TXT interactively:
c:\> describe memo.txt
Describe "memo.txt": Memo to Bob about party
Create the same description in a single command:
c:\> describe memo.txt "Memo to Bob about party"
^bSYNTAX
(Internal NDOS)^b
DIR [ /A:[-rhsda] /O:[-deinsgu] /124BCJKLMNPSTUVW ]
[[drive:][path]filename[;]
^bPURPOSE^b
Display information about files and subdirectories.
^bCOMMENTS^b
The DIR options are:
^b/A:^b
Attributes: Display filenames with specified
attributes. Any combination of the following:
^br^b Read-only
^bh^b Hidden
^bs^b System
^bd^b Directory
^ba^b Archive
^b-^b Prefix means "not"
Use /A: with no attributes to display all filenames
(including hidden and system).
^b/O:^b
Sort Order: Any combination of the following
options:
^bd^b Date and time
^be^b Extension
^bi^b File description
^bn^b Name
^bs^b Size
^bg^b Group directories
^bu^b Unsorted (like COMMAND.COM)
^b-^b A minus sign before a sort key means reverse
the sort order
^b/1^b
One column
^b/2^b
Two columns
^b/4^b
Four columns
^b/B^b
Bare (no header or summaries)
^b/C^b
upperCase
^b/J^b
Justify (like COMMAND.COM)
^b/K^b
No volume label or pathname
^b/L^b
Lowercase
^b/M^b
oMit total bytes information.
^b/N^b
No switches: reset DIR to defaults
^b/P^b
Pause
^b/S^b
Subdirectories included
^b/T^b
aTtributes
^b/U^b
sUmmary (totals only)
^b/V^b
Vertical sort (with /2, /4, or /W)
^b/W^b
Wide display
DIR displays information about the files and subdirectories in
the specified directory. Depending upon the options
specified, DIR can show the filename, file attributes, size,
date and time of the most recent change to the file, and the
file description.
DIR allows wildcard characters (* and ?) in the filename. If
you don't specify a filename, DIR defaults to *.* (display
all files and subdirectories in the current directory).
If you append filenames with a ^b;^b (an "include list"), DIR
will display the matching filenames in a single directory
listing. Only the first file in an include list can have a
path.
If a country code was defined in the CONFIG.SYS file or by the
CHCP command, DIR will display the date in the format for
that country. The default date format is U.S. (mm-dd-yy).
DIR can handle directories of any size, limited only by the
available memory. Each filename requires 32 bytes of DOS
memory plus the size of the description (if any); a system
with 128K of free DOS memory can display up to 4,
0 files
per directory.
Options on the command line apply only to the filenames which
follow the option, except that options at the end of the line
apply to the preceding filename only. This allows you to
specify several options for a group of files, and retains
compatibility with COMMAND.COM when a single filename is
specified.
See also ^rDESCRIBE^r and ^rSELECT^r.
^bEXAMPLES^b
Display the .WKS files, and then the .WK1 files in the current
directory:
c:\> dir *.wks *.wk1
Display the .WKS and .WK1 files together (an "include list"):
c:\> dir c:\ss\*.wks;*.wk1
Display the files in the root directory on drive C, including
hidden and system files, in reverse order of size:
c:\> dir /a:hs /o:-s c:\*.*
^bSYNTAX
(Internal NDOS)^b
^bPURPOSE^b
Display the current directory stack.
^bCOMMENTS^b
DIRS displays the directory stack used by PUSHD and POPD, most
recent entries first. The stack holds 255 characters (about
10 to 20 entries).
See also ^rPUSHD^r and ^rPOPD^r.
^bEXAMPLE^b
Change directories and then display the directory stack:
c:\> pushd c:\database
c:\database> pushd d:\wordp\memos
d:\wordp\memos> dirs
c:\database
^bSYNTAX
(Internal NDOS)^b
DRAWBOX ulrow ulcol lrrow lrcol style [BRIGHT][BLINK]
fg ON bg [FILL bgfill]
^bPURPOSE^b
Draw a box on the screen.
^bCOMMENTS^b
DRAWBOX is useful for creating attractive screen displays in
batch files. DRAWBOX detects other lines and boxes on the
display, and creates the appropriate connector characters
when possible (not all types of lines can be connected with
the available characters).
The row and column are zero-based, so on a standard 25-line by
80-column display, valid rows are 0 to 24 and valid columns
are 0 to 79.
The DRAWBOX parameters are:
^bulrow^b
Row for upper left corner
^bulcol^b
Column for upper left corner
^blrrow^b
Row for lower right corner
^blrcol^b
Column for lower right corner
^bstyle^b
Box drawing style:
^b0^b
borderless
^b1^b
single line
^b2^b
double line
^b3^b
single line top & bottom, double sides
^b4^b
double line top & bottom, single sides
^bfg^b
Foreground character color
^bbg^b
Background character color
^bbgfill^b Background fill color (for the inside of the box)
Only the first three characters of the color name and
attributes ("bright" and "blink") are required.
The available colors are:
Black
Blue
Green
Magenta
Cyan
Yellow
White
See also ^rDRAWHLINE^r and ^rDRAWVLINE^r.
^bEXAMPLE^b
Draw a single line box around the entire screen with bright
white lines on a blue background:
drawbox 0 0 24 79 1 bright white on blue fill blue
^bSYNTAX
(Internal NDOS)^b
DRAWHLINE row columns length style [BRIGHT] [BLINK] fg ON bg
^bPURPOSE^b
Draw a horizontal line on the screen.
^bCOMMENTS^b
DRAWHLINE is useful for creating attractive screen displays in
batch files. DRAWHLINE detects other lines and boxes on the
display, and creates the appropriate connector characters
when possible (not all types of lines can be connected with
the available characters).
The row and column are zero-based, so on a standard 25-line by
80-column display, valid rows are 0 to 24 and valid columns
are 0 to 79.
The DRAWHLINE parameters are:
^brow^b
Start row
^bcolumn^b Start column
^blength^b Length of line
^bstyle^b
Line drawing style:
^b1^b
single line
^b2^b
double line
^bfg^b
Foreground character color
^bbg^b
Background character color
The available colors are:
Black
Blue
Green
Magenta
Cyan
Yellow
White
Only the first three characters of the color name and
attributes ("bright" and "blink") are required.
See also ^rDRAWBOX^r and ^rDRAWVLINE^r.
^bEXAMPLE^b
Draw a double line along the top row of the display with green
characters on a blue background:
drawhline 0 0 79 2 green on blue
^bSYNTAX
(Internal NDOS)^b
DRAWVLINE row columns length style [bright] [BLINK] fg ON bg
^bPURPOSE^b
Draw a vertical line on the screen.
^bCOMMENTS^b
DRAWVLINE is useful for creating attractive screen displays in
batch files. DRAWVLINE detects other lines and boxes on the
display, and creates the appropriate connector characters
when possible (not all types of lines can be connected with
the available characters).
The row and column are zero-based, so on a standard 25-line by
80-column display, valid rows are 0 to 24 and valid columns
are 0 to 79.
The DRAWVLINE parameters are:
^brow^b
Start row
^bcolumn^b Start column
^blength^b Length of line
^bstyle^b
Line drawing style:
^b1^b - single line
^b2^b - double line
^bfg^b
Foreground character color
^bbg^b
Background character color
The available colors are:
Black
Blue
Green
Magenta
Cyan
Yellow
White
Only the first three characters of the color name and
attributes ("bright" and "blink") are required.
See also ^rDRAWBOX^r and ^rDRAWHLINE^r.
^bEXAMPLE^b
Draw a double line along the left margin of the display with
bright red characters on a black background:
drawvline 0 0 24 2 bright red on black
^bSYNTAX
(Internal NDOS)^b
ECHO [ON | OFF | message]
^bPURPOSE^b
Display the echo status, enable or disable batch file or
command line echoing, or display a message.
^bCOMMENTS^b
NDOS defaults to ECHO ON in batch files. To prevent a line
from being echoed, preface it with the @ symbol. You can
default to ECHO OFF by setting the variable VERBOSE to 0 (see
^rSETDOS^r). The current ECHO state is inherited by called batch
files.
NDOS defaults to ECHO OFF during keyboard input. If you set
ECHO ON from the command line, NDOS will display the fully
parsed and expanded commands (including aliases and
variables) before they are executed. The keyboard ECHO state
is independent of the batch file ECHO state; changing ECHO in
a batch file has no effect on the display at the command
prompt, and vice versa.
If no arguments are entered, ECHO displays the current echo
state.
ECHO commands in a batch file will send messages to the screen
while the batch file executes, even if ECHO is set OFF. You
cannot use the command separator character or the NDOS
redirection symbols ( |>< ) in an ECHO message, unless you
enclose them in quotes or precede them with the escape
character.
See also ^rSETDOS^r, ^rSCREEN^r, ^rSCRPUT^r and ^rTEXT^r.
^bEXAMPLE^b
Enable command line echoing:
c:\> echo on
Display a message in a batch file:
echo Processing your print files
Turn off batch file echoing, without displaying the ECHO
command itself:
@echo off
^bSYNTAX
(Internal NDOS)^b
ENDLOCAL
^bPURPOSE^b
Restore the saved disk drive, directory, environment, and
aliases.
^bCOMMENTS^b
ENDLOCAL restores the disk drive, directory, environment
variables and aliases saved by the previous SETLOCAL command.
SETLOCAL and ENDLOCAL can only be used in batch files, not in
aliases.
See also ^rSETLOCAL^r.
^bEXAMPLE^b
This batch file fragment saves the aliases, environment,
drive, and current working directory, changes the drive and
directory, modifies some environment variables, runs the
program TEST1, and then restores the original values:
setlocal
cdd d:\test
set path=c:\;c:\dos;c:\util
set lib=d:\lib
test1
endlocal
^bSYNTAX
(Internal NDOS)^b
DEL [/PQYZ] [drive:][path]filename
ERASE [/PQYZ] [drive:][path]filename
^bPURPOSE^b
Erase the specified file(s) from the disk.
^bCOMMENTS^b
DEL and ERASE are the same command.
See ^rDEL^r for details.
^bSYNTAX
(Internal NDOS)^b
ESET varname
^bPURPOSE^b
Edit environment variables and/or aliases.
^bCOMMENTS^b
ESET allows you to edit your environment variables and aliases
using the NDOS line editing commands (see ^rEditing^r). The
cursor will be positioned at the first character of the
variable or alias.
ESET will search for environment variables first, and then
aliases. If you have an environment variable and an alias
with the same name, ESET will only be able to edit the
environment variable.
NDOS limits environment variable and alias names to 80
characters, and their arguments to 255 characters.
See also ^rALIAS^r, ^rUNALIAS^r, ^rSET^r, and ^rUNSET^r.
^bEXAMPLE^b
Edit the DOS executable file search path:
c:\> eset path
Create and then edit an alias:
c:\> alias d dir /w
c:\> eset d
^bSYNTAX
(Internal NDOS)^b
EXCEPT (pathname
.) command
^bPURPOSE^b
Perform a command, except on the file(s) specified.
^bCOMMENTS^b
EXCEPT provides a means of executing a command on a group of
files and/or subdirectories
except those enclosed within
the parentheses.
The command can be an NDOS internal command or alias, an
external command, or a batch file.
You may use the wildcard characters (? and *) in a filename.
When using filename completion (see Command Line Editing in
the NDOS manual) to get the filenames inside the parentheses,
type a space after the open parenthesis before entering a
partial filename or pressing F9. Otherwise the command line
editor will treat the open parenthesis as the first character
of the filename to be completed.
EXCEPT prevents operations on the specified file(s) by setting
the hidden attribute, performing the command, and then
clearing the hidden attribute. If EXCEPT is aborted in an
unusual way, you may need to use the ATTRIB command to
"unhide" (-H) the file(s).
^rCaution:^r EXCEPT will not work with programs or commands
that ignore the hidden attribute including DEL or ERASE with
the /Z switch.
See also ^rATTRIB^r.
^bEXAMPLE^b
Erase all but the files beginning with MEMO and those ending
in .WKS:
c:\> except (memo*.* *.wks) del *.*
^bSYNTAX
(Internal NDOS)^b
EXIT [n]
^bPURPOSE^b
Return from a secondary command processor.
^bCOMMENTS^b
Some application programs will start a secondary copy of the
command processor to allow you execute DOS commands. To
return to the application again, type EXIT.
Optionally, you can specify a number with EXIT. This is the
ERRORLEVEL value returned to the calling command processor. If
omitted, it defaults to the errorlevel returned by the last
external program.
You cannot EXIT from the primary command processor.
^bEXAMPLE^b
Return to the previous command processor or application:
c:\> exit
^bSYNTAX
(Internal NDOS)^b
FOR %%variable IN (set) [DO] command
^bPURPOSE^b
Repeat a command for several items in a set.
^bCOMMENTS^b
NDOS sets "variable" sequentially to each member of "(set)"
and then evaluates and executes "command" for every argument
in (set). If one of the arguments in (set) contains DOS
wildcard characters (* and ?), variable will be set
sequentially to each matching filename on the disk.
The command can be an NDOS internal command or alias, an
external command, or a batch file.
In COMMAND.COM, you must use a single % for the variable name
from the command line, and %% when in a batch file. NDOS
will accept either % or %% in either case.
COMMAND.COM requires the variable name to be a single
character; NDOS supports variable names up to 80 characters.
COMMAND.COM requires the word DO on the command line; it is
optional in NDOS.
Note that NDOS supports nested FOR statements; COMMAND.COM
does not.
^bEXAMPLE^b
The following example compiles the C programs in the current
directory that have a "2" or a "3" somewhere in their name:
c:\msc> for %a in (*2*.c *3*.c) do cl %a ;
The following example uses variable functions to delete the
.BAK files for which a corresponding .TXT file exists in the
current directory:
for %a in (*.txt) if exist %@name[%a].bak del %@name[%a].bak
^bSYNTAX
(Internal NDOS)^b
FREE [drive:]
^bPURPOSE^b
Display the total disk space, total bytes used, and total
bytes free on the specified (or default) drive(s).
^bCOMMENTS^b
FREE provides the same disk information as the external DOS
command CHKDSK, but without the wait.
See also ^rCHKDSK^r and ^rMEMORY^r.
^bEXAMPLE^b
Display the status of drives A, B, and C:
c:\> free a: b: c:
^bSYNTAX
(Internal NDOS)^b
GLOBAL [/IQ] command
^bPURPOSE^b
Execute a command in the current directory and its
subdirectories.
^bCOMMENTS^b
GLOBAL performs the specified command first in the current
directory, and then in every subdirectory under the current
directory.
The command can be an NDOS internal command or alias, an
external command, or a batch file.
The GLOBAL options are:
^b/I^b Ignore result: If this option is not specified,
GLOBAL will terminate if the command returns a non-
zero exit code.
^b/Q^b Quiet: Do not display the directory names as each
directory is accessed.
^bEXAMPLE^b
Erase all the files with a .BAK extension in every directory
on C:
c:\> global erase *.bak
Copy the files in every directory on drive A to the directory
C:\TEMP:
c:\> cd a:\ ^^ global copy a:*.* c:\temp
^bSYNTAX
(Internal NDOS)^b
GOSUB label
^bPURPOSE^b
Call a subroutine in a batch file.
^bCOMMENTS^b
GOSUB calls the specified label as a subroutine. The
subroutine must end with a RETURN statement. After the
RETURN, NDOS will continue processing with the command
following the GOSUB command.
If the label doesn't exist, the batch file is terminated with
the error message "Label not found."
The label must begin with a colon (:), and appear by itself on
the line. NDOS ignores case differences when matching labels.
See also ^rGOTO^r and ^rRETURN^r.
^bEXAMPLE^b
The following batch file fragment calls a subroutine which
displays the directory and returns:
echo Calling a subroutine
gosub subr1
echo Returned from the subroutine
quit
:subr1
dir /hw
return
^bSYNTAX
(Internal NDOS)^b
GOTO label
^bPURPOSE^b
Continue batch file processing at the line following the
label.
^bCOMMENTS^b
GOTO changes the current position in the batch file to the
line immediately following the label. If the label doesn't
exist, the batch file is terminated with the error message
"Label not found."
The label must begin with a colon (:), and appear by itself on
the line. NDOS ignores case differences when matching labels.
See also ^rGOSUB^r.
^bEXAMPLE^b
The following batch file fragment checks for the existence of
the file CONFIG.SYS. If the file exists, NDOS jumps to
C_EXISTS and copies all the files from the current directory
to the root directory on A. If CONFIG.SYS doesn't exist, NDOS
prints an error message and exits.
if exist config.sys goto C_EXISTS
echo CONFIG.SYS doesn't exist - exiting
quit
:c_exists
copy *.* a:\
^bSYNTAX
(Internal NDOS)^b
HISTORY [/F][/P] [/R pathname]
^bPURPOSE^b
Display, read, or clear the history list.
^bCOMMENTS^b
If no parameters are entered, HISTORY displays the current
history list.
The HISTORY options are:
^b/F^b Free: Clear the command history list.
^b/P^b Pause: Halt the display after each screen.
^b/R^b Read: Load the command history from a specified file.
You can save the history list by redirecting the
output of HISTORY to a file.
The number of commands saved in the history list depends on
the length of each command line. The history list size can be
specified at startup from 512 to 8192 characters. The default
size is 1024 characters.
You can disable saving commands to the history list, or
specify a minimum command line length to save, with the
SETDOS /H command.
See also ^rSETDOS^r.
^bEXAMPLES^b
Display the history list:
c:\> history
Clear the history entries:
c:\> history /f
Save the history list to the file HISTFILE, and then read it
in again:
c:\> history > histfile
c:\> history /r histfile
^bSYNTAX
(Internal NDOS)^b
IF [NOT] condition command
^bPURPOSE^b
Allow conditional execution of commands.
^bCOMMENTS^b
NDOS first tests the given condition. If the condition is
true, NDOS executes the specified command, otherwise the
command will be ignored. If you use the ^bNOT^b option, the
command is executed only when the condition is false. IF
statements can be nested.
The command can be an NDOS internal command or alias, an
external command, or a batch file.
The condition can be any of the following where "op" is
a relational operator: EQ (or ==) NE LT LE GE GT
^bERRORLEVEL [op] n^b
Exit code (ERRORLEVEL) of the
preceding program (default is GE).
^bstring1 op string2^b
Compare two strings (case is ignored).
^bEXIST pathname^b
True if specified file exists.
^bISALIAS aliasname^b
True if specified name is an alias.
^bISDIR [drive:]path^b
True if the directory exists.
For the string tests, case differences are ignored. When
comparing strings, you should enclose them in double quotes
(see examples). The use of double quotes reduces problems
when the strings being compared contain characters which may
have another meaning to NDOS. If the strings begin with a
digit, IF will do a numeric comparison. Otherwise, IF does a
normal ASCII comparison.
IF statements can be nested.
See also ^rIFF^r.
^bEXAMPLES^b
Test for the presence of A:\JAN.DOC and copy it to the root
directory on drive C if it exists:
c:\> if exist a:\jan.doc copy a:\jan.doc c:\
This batch file fragment tests for a string value:
if "%cmd" == "wp" goto wordproc
if "%cmd" NE "graphics" goto badentry
Test for more than 500K of free DOS memory (using a variable
function):
c:\> if %@dosfree[K] gt 500 echo More than 500K free
Test for expanded memory greater than 2 Mb:
c:\> if %@ems[M] gt 2 echo More than 2Mb EMS available
Run the program MONOPROG if the monitor type is monochrome
(using an NDOS environment variable):
c:\> if "%_monitor" == "mono" monoprog
^bSYNTAX
(Internal NDOS)^b
IFF [NOT] condition THEN ^^ command ^^ ELSE[[IFF [NOT]] condition
THEN] ^^ command ^^ ENDIFF
^bPURPOSE^b
Allow IF/THEN/ELSE conditional execution of commands.
^bCOMMENTS^b
NDOS first tests the given condition. If the condition is
true, NDOS executes the specified command(s) until the next
ELSE, ELSEIFF, or ENDIFF; otherwise the command(s) will be
ignored and NDOS will continue parsing at the next ELSE,
ELSEIFF, or ENDIFF. If you use the ^bNOT^b option, commands
are executed only when the condition is false. IFF
statements can be nested up to 15 levels deep.
The command can be an NDOS internal command or alias, an
external command, or a batch file.
If you do a GOTO inside an IFF, NDOS assumes you are jumping
outside the IFF statement. You cannot GOTO another part of
the same IFF, or inside another IFF statement.
See the ^rIF^r command for a list of the tests available.
^bEXAMPLE^b
The following batch file fragment tests the monitor type
(monochrome or color), and sets the appropriate colors and
prompt:
iff "%_monitor" == "color" then
color bright white on blue ^^ cls
prompt=$e[s$e[1;1f$e[41;1;37m$e[K Path: $p$e[u$e[44;37m$n$g
else
prompt=$e[s$e[1;1f$e[0;7m$e[K Path: $p$e[u$e[0m$n$g
endiff
The following alias checks to see if the argument is a
subdirectory. If so, the alias deletes the subdirectory's
files and removes it (enter this on one line):
alias zap `iff isdir %1 then ^^ del %1 ^^ rd %1 ^^
else ^^ echo Not a directory! ^^ endiff`
^bSYNTAX
(Internal NDOS)^b
INKEY [/Wn] [text] %%varname
^bPURPOSE^b
Get a single keystroke environment variable from standard
input.
^bCOMMENTS^b
You can optionally display prompt text before the variable
name.
The only INKEY option is:
^b/Wn^b Wait: Timeout period, where "n" is the number of
seconds to wait for a response. If no keystroke is
entered by the end of the timeout period, INKEY
returns with the variable unchanged. You can specify
/W0 to check if a keystroke is waiting, and return
immediately.
ASCII values from 1 to 255 are stored as a character.
Extended characters (for example, function keys and cursor
keys) are stored as a string in decimal format, with a leading
@ (for example, the F1 key is stored as @59). This is the same
format used by the KEYSTACK command; see ^rKEYSTACK^r for a
list of the extended key codes.
INKEY and INPUT are normally used as batch file commands,
allowing you great flexibility in entering or changing batch
variables.
If you press Ctrl-C or Ctrl-Break while INKEY is waiting for a
key, execution of an alias will be terminated, and execution
of a batch file will be suspended while you are prompted
whether to cancel the batch job.
See also ^rINPUT^r and ^rKEYSTACK^r.
^bEXAMPLES^b
Prompt for a character and store it in the variable NUM:
inkey Enter a number from 1 to 9: %%num
The following batch file fragment waits up to 10 seconds for a
character, then tests to see if a "Y" was entered:
set net=N
inkey /w10 Do you want to load the network (Y/N)? %%net
if "%net" == "Y" goto load_net
^bSYNTAX
(Internal NDOS)^b
INPUT [/Wn] [text] %%varname
^bPURPOSE^b
Enter an environment variable from the standard input.
^bCOMMENTS^b
You can optionally display prompt text before the variable
name.
The only INPUT option is:
^b/W^b Wait: Specify a timeout period, where "n" is the
number of seconds to wait for a response. If no
keystroke is entered by the end of the timeout period,
INPUT returns with the variable unchanged. If you
enter a key before the timeout period, INPUT will wait
indefinitely for the remainder of the line. You can
specify /W0 to check if a key is already in the
buffer, and return immediately.
All characters entered up to, but not including, the carriage
return are stored in the variable.
INPUT and INKEY are normally used as batch file commands,
allowing you great flexibility in entering or changing batch
variables.
See also ^rINKEY^r.
^bEXAMPLE^b
The following batch file fragment prompts for a string and
stores it in the variable FNAME:
input Enter the file name: %%fname
^bSYNTAX
(Internal NDOS)^b
KEYSTACK ["abc"] [nn] [@nn] [!]
^bPURPOSE^b
Feed keystrokes to a program from a batch file or alias.
^bCOMMENTS^b
Characters entered within double quotes ("abc") will be stored
"as is" in the keyboard buffer.
Numbers (nn) not enclosed in quotes are ASCII decimal codes,
for example 13 (Enter), or 27 (ESCAPE). The number 0 is a
special case; it is used with programs that flush the keyboard
buffer (it tells the program the buffer is clear, so
subsequent keystrokes will be accepted normally).
Numbers preceded by @ are extended keyboard codes generated
by the Alt key, cursor pad keys, and the Function keys (for
example, @59 is the F1 function key).
A ! will clear all pending keystrokes, both in the KEYSTACK
buffer and in the keyboard buffer.
You can store a maximum of 255 characters.
Each time KEYSTACK is executed, it will clear any remaining
keystrokes stored by a previous KEYSTACK.
You may need to experiment a bit with your programs to find
the proper sequence of keystrokes. Programs that bypass
DOS and the BIOS for keyboard input cannot read keystrokes
entered with KEYSTACK.
KEYSTACK requires the device driver KEYSTACK.SYS be loaded in
the CONFIG.SYS file.
The following table lists the common key codes:
F1 @59
Alt-F1 @104
Ctrl-F1 @94
Shift-F1 @84
F2 @60
Alt-F2 @105
Ctrl-F2 @95
Shift-F2 @85
F3 @61
Alt-F3 @106
Ctrl-F3 @96
Shift-F3 @86
F4 @62
Alt-F4 @107
Ctrl-F4 @97
Shift-F4 @87
F5 @63
Alt-F5 @108
Ctrl-F5 @98
Shift-F5 @88
F6 @64
Alt-F6 @109
Ctrl-F6 @99
Shift-F6 @89
F7 @65
Alt-F7 @110
Ctrl-F7 @100
Shift-F7 @90
F8 @66
Alt-F8 @
Ctrl-F8 @101
Shift-F8 @91
F9 @67
Alt-F9 @112
Ctrl-F9 @102
Shift-F9 @92
F10 @68 Alt-F10 @113 Ctrl-F10 @103 Shift-F10 @93
F11 @133 Alt-F11 @139 Ctrl-F11 @137 Shift-F11 @135
F12 @134 Alt-F12 @140 Ctrl-F12 @138 Shift-F12 @136
Home @71
PgUp
Left @75
Right @77
Down @80
PgDn
Del @83
Ctrl-Home @119
Ctrl-PgUp @132
Ctrl-Left @115
Ctrl-Right @116
Ctrl-End
@117
Ctrl-PgDn @118
Alt-A @30
Alt-N @49
Alt-1 @120
Alt-B @48
Alt-O @24
Alt-2 @121
Alt-C @46
Alt-P @25
Alt-3 @122
Alt-D @32
Alt-Q @16
Alt-4 @123
Alt-E @18
Alt-R @19
Alt-5 @124
Alt-F @33
Alt-S @31
Alt-6 @125
Alt-G @34
Alt-T @20
Alt-7 @126
Alt-H @35
Alt-U @22
Alt-8 @127
Alt-I @23
Alt-V @47
Alt-9 @128
Alt-J @36
Alt-W @17
Alt-0 @129
Alt-K @37
Alt-X @45
Alt-L @38
Alt-Y @21
Alt-M @50
Alt-Z @44
^bEXAMPLES^b
The following batch file starts Lotus 1-2-3 and loads the file
specified on the command line:
pushd c:\123
keystack 0 13 0 13 0 13 0 13 0 13 "/fr" 0 "%1" 13
popd
The same command defined as an alias (enter this all on one
line):
alias 321 `pushd c:\123 ^^ keystack 0 13 0 13 0 13 0 13
0 13 "/fr" 0 "%1" 13 ^^ 123 ^^ popd`
^bSYNTAX
(Internal NDOS)^b
LOADHIGH [drive:][path]filename [parameters]
LH [drive:][path]filename [parameters]
^bPURPOSE^b
Maximize available RAM by loading programs into high DOS
memory.
^bCOMMENTS^b
LOADHIGH and LH are the same command.
See ^rLOADHIGH^r for details.
^bSYNTAX
(Internal NDOS)^b
LIST [/HSW] [drive:][path]filename
^bPURPOSE^b
Display a file with forward and backward paging and
scrolling.
^bCOMMENTS^b
LIST provides a much faster and more flexible way to view a
file than TYPE, without the overhead of using a text editor.
The LIST options are:
^b/H^b High: Strip the high bit from each character before
displaying. This is useful when displaying files
created by some word processors that turn on the high
bit for formatting purposes.
^b/S^b Standard Input: Read from the standard input rather
than a file. This allows you to redirect command
output and view it with LIST.
^b/W^b Wrap: Text wider than the display is wrapped at the
right margin. This option is useful when displaying
non-text files.
LIST uses the cursor pad to scroll through the file. The
following keys have special meanings (the caret ^^ means press
the Ctrl key together with the specified key):
^bHOME^b
Display the first page of the file
^bEND^b
Display the last page of the file
^bEsc^b
Exit the current file
^b^^C^b
Quit LIST
^bUp Arrow^b
Scroll up one line
^bDown Arrow^b
Scroll down one line
^bLeft Arrow^b
Scroll left 8 columns
^bRight Arrow^b
Scroll right 8 columns
^b^^Left Arrow^b
Scroll left 40 columns
^b^^Right Arrow^b Scroll right 40 columns
^bF1^b
Call the on-line help (HELP.EXE)
^bF^b
Prompt and search for a string (case is
ignored)
^bN^b
Find next matching string (case is ignored).
LIST saves the search string, so you can
LIST multiple files and search for the same
string by pressing F6 in each file.
^bP^b
Print the file on LPT1
LIST is normally only useful for displaying ASCII text files;
executable files (.COM and .EXE) and many data files will be
unreadable due to the presence of non-alphanumeric characters.
See also ^rTYPE^r.
^bEXAMPLES^b
Display the file MEMO.DOC:
c:\> list memo.doc
Display the output from a DIR command:
c:\> dir | list /s
^bSYNTAX
(Internal NDOS)^b
LOADBTM [ON | OFF]
^bPURPOSE^b
Switch a batch file to or from .BTM mode.
^bCOMMENTS^b
LOADBTM switches a batch file (.BAT or .BTM) to and from .BTM
(batch-to-memory) mode. If no argument is given, it displays
the current LOADBTM status.
.BTM mode runs from two to five times faster than .BAT mode,
but should not be used to load memory resident programs or for
self-modifying batch files.
LOADBTM can only be used from within a .BAT or .BTM file.
When a .BTM file is started LOADBTM is ON by default; when a
.BAT file is started LOADBTM is OFF.
See the NDOS Manual for more information on .BTM files.
^bEXAMPLE^b
The following batch file (.BAT) fragment loads some memory
resident programs, and then switches to .BTM mode:
Rem The initial default state is LOADBTM OFF
Rem loading TSRs
ansi.com
mouse.com
Rem Switch to high-speed (BTM) mode. TSRs are loaded.
loadbtm on
set path=c:\;c:\util;c:\dos
alias /r c:\aliases
set NDSHELL=/e:768u /a:512 /u
set tmp=d:\
^bSYNTAX
(Internal NDOS)^b
LOADHIGH [drive:][path]filename [parameters]
LH [drive:][path]filename [parameters]
^bPURPOSE^b
Maximize available RAM by loading programs into high DOS
memory.
^bCOMMENTS^b
LOADHIGH will work on 286 or above systems with suitable
software which can map memory into the 640K to 1MB area.
You must have the DOS 5.x dos=umb command line in your
CONFIG.SYS file.
LOADHIGH and LH are the same command.
^bEXAMPLE^b
To load the CALC.COM memory resident program:
loadhigh c:\util\calc.com
^bSYNTAX
(Internal NDOS)^b
LOG [/W pathname | ON | OFF | "text"]
^bPURPOSE^b
Save a log of commands to a disk file.
^bCOMMENTS^b
LOG defaults to saving to the file NDOS.LOG in the root
directory of the boot drive.
Entering LOG with no parameters displays the log status (ON or
OFF). Entering LOG with text writes the text to the log file,
even if LOG is set OFF. This allows you to enter headers in
the log file.
You can specify a different filename with the ^b/W^b(rite)
option. /W automatically enables command logging.
The commands are stored in the log file as they were entered,
before performing any alias or variable expansion.
The LOG file format looks like:
[mm/dd/yy hh:mm:ss] command
^bEXAMPLES^b
Display the LOG status:
c:\> log
LOG is OFF
Enable command logging:
c:\> log on
Enable command logging to the file C:\LOG\LOGFILE and insert a
header:
c:\> log /w c:\log\logfile
c:\> log "Started work on the database system"
^bSYNTAX
(Internal NDOS)^b
MD [drive:]path
MKDIR [drive:]path
^bPURPOSE^b
Create subdirectories.
^bCOMMENTS^b
MD and MKDIR are the same command.
To start at the root directory, start the path with a
backslash (\). To start at the parent directory, start the
path with two periods (..). All other paths start at the
current directory.
The longest allowable path in DOS from the root directory
to any subdirectory is 64 characters (including backslashes).
See also ^rRD^r.
^bEXAMPLE^b
Create a subdirectory called MYDIR in the root directory:
c:\> md \mydir
^bSYNTAX
(Internal NDOS)^b
MEMORY
^bPURPOSE^b
Display the system RAM status.
^bCOMMENTS^b
MEMORY displays the total RAM, the free RAM (available to
applications programs after loading DOS, device drivers, NDOS
itself, and RAM resident programs); the total and free
expanded memory; the total extended memory and free XMS memory
(on an 80286 or above system), the total and free environment
space, the total and free alias list space, and the total
command history space.
If you compare the free RAM displayed by MEMORY with the free
RAM displayed by CHKDSK and some memory map programs, MEMORY
will usually show a slightly higher value. The difference is
the size of the environment passed to these external
programs; most memory mapping programs do not count the
passed environment as free space.
^bEXAMPLE^b
Display your RAM totals:
c:\> memory
^bSYNTAX
(Internal NDOS)^b
MKDIR [drive:]path
MD [drive:]path
^bPURPOSE^b
Create subdirectories.
^bCOMMENTS^b
MD and MKDIR are the same command.
See ^rMD^r for details.
^bSYNTAX
(Internal NDOS)^b
MOVE [/PQR] [drive:][path]filename
. [drive:][path][filename]
^bPURPOSE^b
Move files to other directories and drives.
^bCOMMENTS^b
The MOVE command moves the specified file(s) to the last
filename specified, which is designated as the target. If
the target already exists, it is deleted when the file is
moved. You cannot move a file to itself.
If there is more than one source file specification, the
target must be a directory, and the files are moved to the
directory with their original filenames. If the target is
not a directory, MOVE will display an error message and exit.
^uUse caution^u when using MOVE with commands like SELECT. If
multiple files are selected and the target is not a
subdirectory, each file will be moved in turn to the target,
overwriting the previous file. The net result is that all
files but the last will be deleted. If SELECT is invoked using
square brackets instead of parentheses, the MOVE will be done
in a single command and MOVE will detect the error.
The MOVE options are:
^b/P^b Prompt: Confirm (Y/N) each move.
^b/Q^b Quiet: Don't display files as they are moved.
^b/R^b Replace: Prompt (Y/N) before overwriting an
existing file.
MOVE first attempts to rename the file(s). If that fails (the
target is on a different drive, or the target already
exists), MOVE will copy the file(s) and then delete the
originals. If MOVE cannot delete the original (for example,
a read-only file), it will display an error message, but the
target file is still created.
See also ^rCOPY^r and ^rREN^r.
^bEXAMPLES^b
Move some files to a different directory:
c:\> move *.wks *.txt c:\finance\myfiles
Move all the files in the current directory to A:\, prompting
before overwriting any existing files:
c:\> move /r *.* a:\
^bSYNTAX
(Internal NDOS)^b
NDOS [startup options]
^bPURPOSE^b
Load a secondary command processor.
^bCOMMENTS^b
A secondary shell is any shell not loaded from SHELL= in the
CONFIG.SYS file. The COMSPEC environment variable specifies
the SHELL name, but not the options.
NDSHELL is a special environment variable to specify the
secondary shell configuration. If it is not defined, default
values will be used. If options are specified on the command
line for the secondary shell, they will override the NDSHELL
settings.
See the NDOS manual for ^bstartup options^b for NDSHELL and NDOS
from the command line.
Use the EXIT command to exit from a secondary shell.
See also ^rEXIT^r and ^rSET^r.
^bEXAMPLE^b
Set secondary shells to load from the root directory, use EMS
swapping, and guarantee 512 bytes of free environment space:
set ndshell=/s:e /e+512
^bSYNTAX
(Internal NDOS)^b
PATH [drive:]path1][;[[drive:]path2]
PATH [;]
^bPURPOSE^b
Tells NDOS where to search for executable and batch files not
in the current directory.
^bCOMMENTS^b
When searching for an external command (.COM, .EXE, .BTM, and
.BAT), NDOS searches the current directory first, then the
directories you specify in the PATH, in the order you list
them. The directory names are separated by semicolons (;).
Like COMMAND.COM, NDOS shifts the entire path to uppercase
before storing it in the environment. This maintains
compatibility with programs which can only recognize an
uppercase path.
If you enter PATH with no parameters, NDOS displays the
current search path. If you enter PATH and a semicolon, NDOS
clears the search path and will search only the current
directory (this is the default at system startup).
If you specify an invalid directory, NDOS will skip that
directory and continue searching with the next directory in
the path.
Some applications also use the PATH variable to search for
their files.
You can edit an existing path with the ^rESET^r command.
^bEXAMPLES^b
The following PATH command directs NDOS to search for an
executable file in the following order: the current
directory, the root directory on drive C, the DOS
subdirectory on drive C, and the UTIL subdirectory on drive
c:\> path c:\;c:\dos;c:\util
Display the current search path:
c:\> path
^bSYNTAX
(Internal NDOS)^b
PAUSE [message]
^bPURPOSE^b
Suspend alias or batch file execution.
^bCOMMENTS^b
A PAUSE command will suspend execution, giving you the
opportunity to perform activities such as changing disks,
turning on the printer, etc.
PAUSE flushes the keyboard buffer and waits for any key
(except Ctrl-C or Ctrl-Break) to be pressed and then continues
executing. If a prompt message is specified, NDOS will display
the message and wait for a keystroke. Otherwise, PAUSE will
prompt:
Press a key when ready
If you press a Ctrl-C or Ctrl-Break while PAUSE is waiting for
a key, execution of an alias will be terminated, and execution
of a batch file will be suspended while you are prompted
whether to cancel the batch file.
See also ^rINKEY^r and ^rINPUT^r.
^bEXAMPLE^b
The following batch file fragment prompts the user before
erasing files:
pause Ctrl-C aborts, any other key erases the .LST files
erase *.lst
^bSYNTAX
(Internal NDOS)^b
POPD [*]
^bPURPOSE^b
Change to the disk drive and directory at the top of the
directory stack.
^bCOMMENTS^b
POPD restores the disk and directory saved using PUSHD (most
recent first).
The * option clears the directory stack, without changing the
current drive and directory.
Use the DIRS command to display the directory stack.
See also ^rDIRS^r and ^rPUSHD^r.
^bEXAMPLES^b
Save and change your disk drive and directory with PUSHD, and
then restore it with POPD:
c:\> pushd d:\database\test
d:\database\test> popd
c:\>
Clear the directory stack:
c:\> popd *
^bSYNTAX
(Internal NDOS)^b
PROMPT [text]
^bPURPOSE^b
Change the NDOS command line prompt.
^bCOMMENTS^b
If you enter PROMPT with no parameters, NDOS sets the prompt
on drives A and B to $n$g (display current disk only), and on
all other drives to $p$g (display current disk and directory).
The prompt text can contain special strings of the form $?,
where ? is one of the following:
^bb^b The | character
^bc^b The open parenthesis (
^bd^b Current date, in the format: Sun Jan 1, 1989
^be^b The ASCII ESC character (decimal 27)
^bf^b The close parenthesis )
^bg^b The > character
^bh^b BACKSPACE over the previous character.
^bl^b The < character
^bn^b Default drive letter
^bP^b Current disk and directory (upper case)
^bp^b Current disk and directory (lower case)
^bq^b The = character
^bs^b The space character
^bt^b Current time, in the format hh:mm:ss
^bv^b MS-DOS version number, in the format: 3.31
^bXd:^b Current disk and directory (upper case) where ^bd:^b is
the drive specification
^bxd:^b Current disk and directory (lower case) where ^bd:^b is
the drive specification
^bz^b Display the current NDOS shell nesting level (you must
be running NDOS as the primary shell in swapping mode).
The primary command processor is 0. Resident copies of
NDOS return a 99 for the shell nesting level.
^b$^b The $ character
^b_^b CR/LF (go to beginning of new line)
Under COMMAND.COM, it is possible to use the PROMPT command in
a batch file to transmit ANSI control sequences to the screen
(for example, to redefine function keys). This is because
COMMAND.COM displays a prompt when echoing lines in a batch
file. This technique will not work with NDOS, because NDOS
doesn't display a prompt within batch files; hence the
characters in the PROMPT string are never sent to ANSI.SYS.
To send ANSI sequences in NDOS, use the ECHO command,
substituting
e (Ctrl-X followed by an e) where you would use
$e in the PROMPT string.
See also ^rANSI^r.
^bEXAMPLE^b
Set the prompt to the current date and time:
c:\> prompt $d $t $g
Mon Dec 25, 1989 18:29:19 >
^bSYNTAX
(Internal NDOS)^b
PUSHD [[drive:]path]
^bPURPOSE^b
Save the current disk and directory.
^bCOMMENTS^b
PUSHD saves the current directory on the directory stack, and
if a pathname is specified on the command line, changes the
disk drive and directory. If The directory stack can hold up
to 255 characters (about 10 to 20 entries). If you exceed the
directory stack size, the oldest directory is removed before
adding the current directory.
The saved directory is restored on a "last in, first out"
basis by the POPD command. The directory stack can be
displayed with the DIRS command.
See also ^rCDD^r, ^rDIRS^r and ^rPOPD^r.
^bEXAMPLE^b
Save the current directory and change to C:\WORDP\MEMOS:
c:\> pushd c:\wordp\memos
c:\wordp\memos>
^bSYNTAX
(Internal NDOS)^b
^bPURPOSE^b
Terminate the current batch file.
^bCOMMENTS^b
You can QUIT at any point in a batch file, not just the end.
If you QUIT a batch file called from another batch file, you
will be returned to the previous file at the command following
the original call. To end all batch file processing, use
CANCEL.
See also ^rCANCEL^r.
^bEXAMPLE^b
Check to see if the user entered "quit" and exit if true:
input Enter your choice: %%option
if "%option" == "quit" quit
^bSYNTAX
(Internal NDOS)^b
RD [drive:]path
RMDIR [drive:]path
^bPURPOSE^b
Remove one or more directories.
^bCOMMENTS^b
RD and RMDIR are the same command.
Before removing a subdirectory, you must delete all the files
and subdirectories (and their files) in that directory
(including any hidden or read-only files).
You can use the DOS wildcard characters (* and ?) in the
directory names.
You cannot remove the root directory (\), the current
directory (.), or the parent directory (..).
See also ^rMD^r.
^bEXAMPLE^b
Remove the subdirectory MEMOS from the directory WP on the
current drive:
c:\> rmdir \wp\memos
^bSYNTAX
(Internal NDOS)^b
REM [comment]
^bPURPOSE^b
Put a comment in a batch file.
^bCOMMENTS^b
If ECHO is ON, or the variable VERBOSE (see the SETDOS
command) is set, NDOS will echo the comment. Otherwise, NDOS
will ignore it. If you don't want to echo the line, preface
REM with the @ character.
Enter your comment following the REM, separated by a space or
tab. Comments can be up to 255 characters. NDOS will ignore
everything following a REM, including quote characters, the
redirection symbols (|><) and the command separator character.
Batch file comments are useful for documenting the purpose for
a batch file and the procedures used.
^bEXAMPLE^b
Enter comments in a batch file:
rem This batch file provides a menu-based system for
rem accessing the word processing utilities. Clear
rem the screen and get a selection.
^bSYNTAX
(Internal NDOS)^b
REN [/PQ] [drive:][path]filename
. [drive:][path]filename
RENAME [/PQ] [drive:][path]filename
. [drive:][path]filename
^bPURPOSE^b
Rename files or subdirectories.
^bCOMMENTS^b
REN and RENAME are the same command.
The last filename is the new name; preceding names are the
files or directories to be renamed. You can use the wildcard
characters (* and ?) in the filenames. The new filename must
not already exist. You cannot rename a subdirectory to a new
path!
The REN options are:
^b/P^b Prompt: Confirm (Y/N) each rename.
^b/Q^b Quiet: Don't display filenames as they are renamed.
RENAME in COMMAND.COM only allows a path to be specified with
the first file name; the path for the target is always the
same as the source. NDOS allows you to optionally select the
target path, renaming the source file to a new directory on
the same disk drive. If you don't specify a path for the
target, NDOS will assume a "COMMAND.COM compatible RENAME" and
will rename the source file to the new name without moving it
to another directory.
If you want to rename to a different drive, use MOVE.
See also ^rMOVE^r.
^bEXAMPLE^b
Rename the file MEMO.TXT to OFFICE.TXT:
c:\> rename memo.txt office.txt
Rename the directory \WORDPROC to \WP:
c:\> rename \wordproc \wp
^bSYNTAX
(Internal NDOS)^b
RENAME [/PQ] [drive:][path]filename
. [drive:][path]filename
REN [/PQ] [drive:][path]filename
. [drive:][path]filename
^bPURPOSE^b
Rename files or subdirectories.
^bCOMMENTS^b
REN and RENAME are the same command.
See ^rREN^r for details.
^bSYNTAX
(Internal NDOS)^b
RETURN
^bPURPOSE^b
Return from a GOSUB (subroutine) call in a batch file.
^bCOMMENTS^b
The RETURN command returns from a GOSUB call to the command
following the original GOSUB.
See also ^rGOSUB^r.
^bEXAMPLE^b
The following batch file fragment calls a subroutine which
displays the current directory:
echo Calling a subroutine
gosub subr1
echo Returned from the subroutine
quit
:subr1
dir /hw
return
^bSYNTAX
(Internal NDOS)^b
RMDIR [drive:]path
RD [drive:]path
^bPURPOSE^b
Remove one or more directories.
^bCOMMENTS^b
RD and RMDIR are the same command.
See ^rRD^r for details.
^bSYNTAX
(Internal NDOS)^b
SCREEN row column [message]
^bPURPOSE^b
Position the cursor on the screen, and optionally display a
message.
^bCOMMENTS^b
The row and column are zero-based. On a standard 25-line by
80-column display, valid rows are 0 to 24 and valid columns
are 0 to 79.
SCREEN allows you to create attractive batch file screen
displays.
SCREEN does not change the screen colors. If you have
ANSI.SYS installed and have set colors with CLS or COLOR,
those colors will be used for the display. To display text
in specific colors, use SCRPUT.
SCREEN checks for a valid row and column, and displays an
error message if either value is out of range.
See also ^rECHO^r, ^rSCRPUT^r and ^rTEXT^r.
^bEXAMPLE^b
The following batch file fragment displays a menu:
@echo off
screen 3 10 Select a number from 1 to 4:
screen 6 20 1 - Word Processing
screen 7 20 2 - Spreadsheet
screen 8 20 3 - Telecommunications
screen 9 20 4 - Quit
^bSYNTAX
(Internal NDOS)^b
SCRPUT row column [BRIGHT] [BLINK] fg ON bg text
^bPURPOSE^b
Display text in color.
^bCOMMENTS^b
The row and column are zero-based. On a standard 25-line by
80-column display, valid rows are 0 to 24 and valid columns
are 0 to 79.
SCRPUT works like SCREEN, but allows you to specify the
display colors, and writes directly to the screen.
The parameters are:
^brow^b
Start row
^bcolumn^b Start column
^bfg^b
Foreground character color
^bbg^b
Background character color
Only the first three characters of the color name and
attributes ("bright" and "blink") are required.
The available colors are:
Black
Blue
Green
Magenta
Cyan
Yellow
White
See also ^rECHO^r, ^rSCREEN^r and ^rTEXT^r.
^bEXAMPLE^b
The following batch file fragment displays a menu in color:
@echo off ^^ cls white on blue
scrput 3 10 bri white on blue Select a number from 1 to 4:
scrput 6 20 bri red on blue 1 - Word Processing
scrput 7 20 bri yellow on blue 2 - Spreadsheet
scrput 8 20 bri green on blue 3 - Telecommunications
scrput 9 20 bri magenta on blue 4 - Quit
^bSYNTAX
(Internal NDOS)^b
SELECT [/A[:]-rhsda] [/O[:]-deinsgu] [command] (pathname
^bPURPOSE^b
Execute a command on the specified files. This command is
completely different from and replaces the external DOS
command with the same name.
^bCOMMENTS^b
SELECT allows you to select command line file arguments by
marking the files using a full-screen "point-and-shoot"
display. SELECT substitutes the selected files for the
argument enclosed in parentheses, and executes the command
for each marked file.
SELECT uses the cursor up, cursor down, PgUp, and PgDn keys
to scroll through the files matching the argument(s).
Use the + key to select a file, and the - key to unselect a
file. The * key will select all of the files (excluding
subdirectories). After marking the files, press Enter to
execute the command. You can select a single file by moving
the scroll bar to the filename and pressing Enter.
To cancel the SELECT command, type an Escape, Ctrl-C, or
Ctrl-Break.
The SELECT options are:
^b/A:^b
Attributes: Display filenames with specified
attributes. Any combination of the following:
^br^b Read-only
^bh^b Hidden
^bs^b System
^bd^b Directory
^ba^b Archive
^b-^b Prefix means "not"
^b/O:^b
Sort Order: Any combination of the following
options:
^bd^b Date and time
^be^b Extension
^bi^b File description
^bn^b Name
^bs^b Size
^bg^b Group directories
^bu^b Unsorted (like COMMAND.COM)
^b-^b A minus sign before a sort key means reverse
the sort order
If you specify multiple arguments in the parentheses, SELECT
will display the matching files for the first argument, prompt
you to mark the files, execute the command for each marked
file, and then continue the same procedure with the next
argument.
If you append filenames with a ^b;^b (an "include list"),
SELECT will display the matching filenames in a single
listing. Only the first filename in an include list can have
a path.
If you enclose the arguments in square brackets [] rather than
parentheses, SELECT will insert all of the arguments into the
command line and only execute the command once. You must be
careful not to exceed the maximum line length (127 characters
for external commands, and 255 characters for internal NDOS
commands).
^bEXAMPLE^b
Select from the files in the current directory with the
extension .COM, and then from the files with the extension
.EXE to copy to the root directory on drive A:
c:\> select copy (*.com *.exe) a:\
Select and run an executable program (.COM, .EXE, or .BAT)
from files in the C:\UTIL directory (an "include list"):
c:\> select (c:\util\*.com;*.exe;*.bat)
^bSYNTAX
(Internal NDOS)^b
SET [/P][/R pathname
.] [variable[=][value]]
^bPURPOSE^b
Display, create, modify, or delete environment variables.
^bCOMMENTS^b
Entering SET with no variable or value displays the
environment. If you don't enter a value, SET will remove the
variable from the environment. Otherwise, the variable and
value are placed in the environment. If the variable already
exists, its old contents are replaced by the new value.
NDOS limits the variable name to a maximum of 80 characters,
and the value to a maximum of 255 characters. The variable
names are shifted to upper case before being stored in the
environment; the value is stored exactly as entered.
The SET options are:
^b/P^b Pause: Halt display after each screen.
^b/R^b Read: Load environment variables from a file.
Reading environment variables from a file is much faster than
loading variables in a batch file. The file is in the same
format as the SET display, so SET /R can accept as input a
file generated by redirecting SET output. For example, the
following commands will save the environment variables to a
file, and then reload them from that file:
set > varlist
set /r varlist
You can load variables from multiple files by listing the
filenames individually after the /R. You can also add comments
to a variable file by starting the comment line with a colon.
SET only affects the environment of the current command
processor. If you EXIT to a parent command processor, the
original environment will be unchanged. The size of the
environment is specified by the /E parameter at startup. The
default size is 512 characters, the minimum size 256
characters, and the maximum size 32
0 characters.
You can remove multiple environment variables with the UNSET
command, and edit environment variables with the ESET command.
See also ^rESET^r and ^rUNSET^r.
^bEXAMPLE^b
Display the current environment:
c:\> set
Add a variable to the environment:
c:\> set mine=c:\finance\myfiles
Remove a variable from the environment:
c:\> set mine=
^bSYNTAX
(Internal NDOS)^b
SETDOS [/A? /C? /E? /F? /H? /I+|-command /L? /M? /N? /R? /S?:?
/U? /V?]
^bPURPOSE^b
Display or set NDOS configuration variables.
^bCOMMENTS^b
SETDOS allows you to customize NDOS to your personal tastes.
You would normally define the SETDOS variables in AUTOEXEC.BAT
or NSTART.BAT.
The SETDOS options are:
^bA^b The ANSI variable determines whether NDOS will attempt
to use an ANSI escape sequence for CLS. NDOS normally
determines this itself, but if you are using a
non-standard ANSI driver or your loading sequence is
unusual, you may need to explicitly inform NDOS. /A0
allows NDOS to determine whether an ANSI driver is
installed; /A1 forces NDOS to assume an ANSI driver is
installed; /A2 forces NDOS to assume an ANSI driver is
not installed.
^bC^b The COMPOUND variable is the character used for
separating multiple commands on the same line. The
default character is the caret (^^). You cannot use
any of the redirection characters (|><), or the white-
space characters as the command separator.
^bE^b The ESCAPE variable is the character used to suppress
the normal meaning of the following character. Any
character following the escape character will be
passed unmodified to the command line. The default
escape character is ^^X (Ctrl-X). You cannot use any of
the redirection characters (|><) or the whitespace
characters as the escape character.
^bF^b The FILENAME variable sets filename truncation. The
default is /F0 for filename truncation. Use /F1 for
full filenames.
^bH^b The HISTORY variable determines the minimum command
size to save. Any command line whose length is less
than this value will not be saved to the history
list. Setting /H to 256 will disable history saves;
setting it to 0 will save everything. The default
value is 0 (save all command lines).
^bI^b The INTERNAL variable allows you to disable or enable
internal NDOS commands. To disable a command, precede
the command name with a minus (-). To re-enable a
command, precede it with a plus (+).
^bL^b The LINE variable controls how NDOS gets its input from
the command line. The default value is 0 (character
input). If you set /L to 1, NDOS uses the MS-DOS "Get
Line" call (like COMMAND.COM). Note that this will
disable command line editing, history recall, and
filename expansion. If you have a program that requires
line input, you can define an alias or batch file:
setdos /L1 ^^ program %& ^^ setdos /L0
^bM^b The MODE variable controls the line editing mode. NDOS
defaults to overstrike mode (/M0). If MODE is set to
1, the default is insert mode.
^bN^b The NOCLOBBER variable controls output redirection. If
NOCLOBBER is set to 1, then existing files may not be
destroyed by output redirection, and when appending
with >>, the output file must exist. NOCLOBBER can be
overridden with the ! character. The default value is
^bR^b The ROWS variable determines the number of screen rows
used by the video display. Normally NDOS detects the
screen size, but if you have a non-standard display
you may need to set it explicitly. The ROWS variable
does not affect screen scrolling (that is controlled
by your video BIOS or ANSI.SYS); it is used only for
LIST, SELECT, the paged output options (i.e., TYPE
/P), and error checking in the screen output commands.
^bS^b The SHAPE variable sets the NDOS cursor shape. The
format is /Ss:e, where "s" is the starting scan line,
and "e" the ending. The default values are the last
two lines of the cursor cell. The default editing
mode (see /M above) uses the default cursor shape; the
other mode displays a block (if the default is an
underline), or an underline (if the default is a
block). SETDOS will change the cursor shape
immediately, so it can be used to hide the cursor
while in a batch file (for example, SETDOS /S32:32).
^bU^b The UPPER variable controls the way filenames are
displayed for the internal commands (COPY, DIR,
etc.). If UPPER is 1, filenames will be displayed in
uppercase (like COMMAND.COM). Upper defaults to /U0
(filenames will be displayed in lower case).
^bV^b The VERBOSE variable controls command echoing in batch
files. If VERBOSE is set to 0, batch files will NOT
be echoed unless ECHO is set ON. VERBOSE defaults to
1 (batch file commands WILL be echoed).
^bEXAMPLES^b
Change the COMPOUND character to a ~ (tilde):
c:\> setdos /c~
Change MODE to insert, VERBOSE to off, and set NOCLOBBER on:
c:\> setdos /m1 /v0 /n1
Disable the internal LIST command to force NDOS to use an
external command:
c:\> setdos /i-list
^bSYNTAX
(Internal NDOS)^b
SETLOCAL
^bPURPOSE^b
Save a copy of the current disk drive, directory, environment
variables, and aliases.
^bCOMMENTS^b
SETLOCAL is used in batch files to save the disk drive,
directory, aliases, and environment variables to a reserved
block of memory. You can then change their values, and later
restore the original values with ENDLOCAL. You cannot use
SETLOCAL in an alias.
SETLOCAL and ENDLOCAL are not nestable within the same batch
file. However, you can have multiple SETLOCAL and ENDLOCAL
pairs within a batch file, and nested batch files can each
have their own SETLOCAL and ENDLOCAL. NDOS will automatically
perform an ENDLOCAL at the end of a batch file.
Note that if you invoke a batch from another without using
CALL, the first batch file is implicitly terminated, and an
automatic ENDLOCAL performed. The second batch file will
inherit the drive, directory, environment variables, and
aliases as they were prior to the SETLOCAL.
Do not use TSRs (memory-resident programs) from a batch file
while SETLOCAL is in effect. If you do, when ENDLOCAL is
executed and the memory used by SETLOCAL is released, a
"hole" will be left in memory below the TSR. This is not
usually harmful, but wastes memory.
See also ^rENDLOCAL^r.
^bEXAMPLE^b
This batch file fragment saves the disk drive, directory,
aliases, and environment variables, changes the disk and
directory, modifies some variables, runs a program, and then
restores the original values:
setlocal
cdd d:\test ^^ set path=c:\dos;c:\util ^^ set lib=d:\lib
rem run some program here
endlocal
^bSYNTAX
(Internal NDOS)^b
SHIFT [n]
^bPURPOSE^b
Allow the use of more than 10 variables in a batch file.
^bCOMMENT^b
SHIFT is provided for compatibility with COMMAND.COM.
COMMAND.COM supports only 10 parameters (%0 through %9); NDOS
supports 128 parameters (%0 to %127), so you may not need to
use SHIFT for batch files running exclusively under NDOS.
SHIFT moves each of the batch file parameters "n" positions
(for example, %1 becomes %0, %2 becomes %1, etc.). The default
value for "n" is 1. You can also reverse a SHIFT, by giving a
negative value for "n" (for example, if "n" is -1, the former
value for %0 is restored, %0 becomes %1, %1 becomes %2, etc.).
SHIFT also affects the %n& (command line tail) and %# (number
of command arguments) batch variables.
^bEXAMPLE^b
Create a batch file called TEST.BAT:
echo %1 %2 %3 %4
shift
echo %1 %2 %3 %4
shift 2
echo %1 %2 %3 %4
shift -1
echo %1 %2 %3 %4
Executing TEST.BAT produces the following results:
c:\> test zero one two three four five six
zero one two three
one two three four
three four five six
two three four five
^bSYNTAX
(Internal NDOS)^b
SWAPPING [ON | OFF]
^bPURPOSE^b
Display, enable, or disable the NDOS swapping state.
^bCOMMENTS^b
SWAPPING will temporarily disable or enable the swapping of
the NDOS transient portion to EMS, XMS, or disk. This is
particularly useful when running batch files while swapping
to disk.
If swapping is enabled, NDOS saves its transient portion
before executing any external command. When the command
finishes, NDOS performs a checksum on the transient portion,
and restores it if necessary. (When swapping to EMS or XMS,
NDOS always restores the transient portion.)
When you are running several small programs from a batch file
and using disk swapping, the swapping can sometimes cause a
noticeable delay. Turning SWAPPING OFF can speed up such
operations, particularly in a length AUTOEXEC.BAT file.
If SWAPPING is OFF, available DOS memory will be reduced by
the size of the NDOS transient portion (about 80K). Setting
SWAPPING OFF does not close the disk swap file, or release any
reserved EMS or XMS memory.
^bEXAMPLES^b
Check the current SWAPPING status:
c:\> swapping
SWAPPING is ON
The following batch file fragment disables swapping, runs
several programs, and then re-enables swapping:
swapping off
c:\util\mouse
c:\video\ansi.com
cls bright white on blue
c:\bin\cache.com
swapping on
^bSYNTAX
(Internal NDOS)^b
TEE [/A] pathname
^bPURPOSE^b
Copy standard input to standard output, and save a copy in the
specified file(s).
^bCOMMENTS^b
The only option for TEE is:
^b/A^b Append: Output is added to the file(s) rather than
overwriting it.
If you are typing at the keyboard, you need to enter a Ctrl-Z
to terminate the input.
TEE is often used to save the intermediate output of a pipe.
See also ^rY^r.
^bEXAMPLE^b
Search the file DOC for any lines containing the string
"NDOS", make a copy of the matching lines in N.DAT, and write
them to the output file NDOS.DAT:
c:\> find "NDOS" doc | tee n.dat | sort > ndos.dat
^bSYNTAX
(Internal NDOS)^b
ENDTEXT
^bPURPOSE^b
Display a block of text in a batch file.
^bCOMMENTS^b
The TEXT command is useful for displaying menus or
multiple-line messages. TEXT will display subsequent lines
in the text until terminated by ENDTEXT. Both TEXT and
ENDTEXT must be entered as the only command on that line.
If you have ANSI.SYS loaded, you can change screen colors by
inserting ANSI escape sequences into the text block.
See also ^rECHO^r, ^rSCREEN^r, and ^rSCRPUT^r.
^bEXAMPLE^b
The following batch file fragment displays a simple menu:
@echo off ^^ cls ^^ screen 2 0
text
Enter one of the following:
1 - Spreadsheet
2 - Word Processing
3 - DOS Utilities
Enter your selection:
endtext
^bSYNTAX
(Internal NDOS)^b
TIME [hh:mm:ss [A|P]]
^bPURPOSE^b
Display or set the current system time.
^bCOMMENTS^b
If you don't enter any parameters, TIME will display the
current system time and prompt you for a new time. Press
ENTER if you don't wish to change the time, otherwise enter
the new time.
The parameters for the TIME command are:
^bhh^b
hour (0 to 23).
^bmm^b
minute (0 to 59).
^bss^b
second (0 to 59).
^bA^b
AM for 12 hour format.
^bP^b
PM for 12 hour format.
TIME defaults to 24-hour format, but you can optionally enter
the time in 12-hour format by appending an "A" or "P" for am
or pm.
Whenever you create or modify a file, the system time is
recorded in the directory entry.
See also ^rCHCP^r and ^rDATE^r.
^bEXAMPLES^b
Enter the time (9:30 am):
c:\> time 9:30
To be prompted for the time:
c:\> time
Mon Dec 25, 1989 9:30:10
New time (hh:mm:ss):
^bSYNTAX
(Internal NDOS)^b
TIMER [/S]
^bPURPOSE^b
System stopwatch.
^bCOMMENTS^b
The TIMER command turns the system stopwatch on and off. The
first time you run TIMER, the stopwatch starts. When you run
TIMER again, the stopwatch stops and the elapsed time is
displayed.
The only option for TIMER is:
^b/S^b Split Time: Display elapsed times without stopping
the timer.
TIMER is particularly useful for timing events in batch
files.
The smallest interval TIMER can measure 0.06 seconds; the
largest interval is 23:59:59.99.
See also ^rTIME^r.
^bEXAMPLE^b
Start the timer:
c:\> timer
Timer on: 12:21:46
Display a split time:
c:\> timer /s
Elapsed time: 0:00:06.19
Stop the timer:
c:\> timer
Timer off: 12:21:58
Elapsed time 0:00:12.06
^bSYNTAX
(Internal NDOS)^b
TYPE [/LP] [drive:][path]filename
^bPURPOSE^b
Display the contents of the specified file(s).
^bCOMMENTS^b
The TYPE command displays a file. Press ^^S to suspend the
display, and any character key to continue the display.
The TYPE options are:
^b/L^b Line: Display line numbers preceding each line
of text.
^b/P^b Pause: Halt display after each screen. Press Ctrl-C to
quit, or any other key to display the next screen.
TYPE is normally only useful for displaying ASCII text files;
executable files (.COM and .EXE) and many data files will be
unreadable due to the presence of non-alphanumeric characters.
You will probably find LIST to be more useful for displaying
files.
See also ^rLIST^r.
^bEXAMPLE^b
Display the files MEMO1 and MEMO2, pausing at the end of each
page:
c:\> type /p memo1 memo2
^bSYNTAX
(Internal NDOS)^b
UNALIAS alias
UNALIAS *
^bPURPOSE^b
Remove aliases from the alias list.
^bCOMMENTS^b
UNALIAS also accepts the wildcard character * to delete all
aliases.
See also ^rALIAS^r and ^rESET^r.
^bEXAMPLES^b
Remove the alias DDIR:
c:\> unalias ddir
Remove the aliases DDIR and ZAP:
c:\> unalias ddir zap
Remove all the aliases:
c:\> unalias *
^bSYNTAX
(Internal NDOS)^b
UNSET name
UNSET *
^bPURPOSE^b
Remove variables from the environment.
^bCOMMENTS^b
UNSET also accepts the wildcard character * to delete all
environment variables. Use caution with UNSET * as many
programs are dependent on environment variables, and NDOS
itself relies on PATH, COMSPEC, and NDSHELL.
See also ^rSET^r and ^rESET^r.
^bEXAMPLES^b
Remove the variable CMDLINE:
c:\> unset cmdline
Remove the variables CMDLINE and PATH:
c:\> unset cmdline path
Remove all the environment variables:
c:\> unalias *
^bSYNTAX
(Internal NDOS)^b
^bPURPOSE^b
Display the current NDOS and MS-DOS versions.
^bCOMMENTS^b
The NDOS and DOS versions consist of a one-digit major
version number, a period, and a two-digit minor version
number.
^bEXAMPLE^b
Get the current version of NDOS and DOS:
c:\> ver
DOS version 3.30
NDOS, Norton Utilities 6.01
^bSYNTAX
(Internal NDOS)^b
VERIFY [ON | OFF]
^bPURPOSE^b
Display, enable, or disable disk write verification.
^bCOMMENTS^b
When VERIFY is ON, DOS will verify that no error occurred
during each disk write operation. It does NOT compare the
data actually written to the disk. VERIFY will remain ON
until you set it OFF.
Entering VERIFY with no parameters will display the current
VERIFY state.
Verification will slow your disk write operations.
At system startup, VERIFY is OFF.
^bEXAMPLES^b
Check the current verify status:
c:\> verify
VERIFY is OFF
Enable disk write verification:
c:\> verify on
^bSYNTAX
(Internal NDOS)^b
VOL [drive:]
^bPURPOSE^b
Display the disk volume label(s).
^bCOMMENTS^b
If you don't enter a drive name, VOL displays the disk label
for the current drive.
If the disk doesn't have a volume name, VOL will report it as
"unlabeled."
Volume labels can be created, changed or deleted with the DOS
LABEL command.
See also ^rDISKCOPY^r and ^rLABEL^r.
^bEXAMPLE^b
Display the disk labels for drives A and B:
c:\> vol a: b:
Volume in drive A: is unlabeled
Volume in drive B: is BACKUP_2
^bSYNTAX
(Internal NDOS)^b
Y pathname
^bPURPOSE^b
Copy standard input to standard output, and then copy the
specified file(s) to standard output.
^bCOMMENTS^b
Standard input from the console is terminated by a Ctrl-Z.
See also ^rTEE^r.
^bEXAMPLE^b
Get text from standard input, append the files MEMO1 and MEMO2
to it, and send the output to MEMOS:
c:\> y memo1 memo2 > memos
^bSYNTAX
(Internal NDOS/External Norton BE)^b
BE command
^bPURPOSE^b
Enhance batch file capabilities.
^bCOMMENTS^b
For faster execution of batch files, NDOS directly supports
the following Norton Batch Enhancer subcommands:
BE ASK
BE REBOOT
BE BEEP
BE ROWCOL
BE BOX
BE SA
BE CLS
BE SHIFTSTATE
BE DELAY
BE TRIGGER
BE MONTHDAY
BE WEEKDAY
BE PRINTCHAR
BE WINDOW
Each BE command is described under its own entry. Use
^bBE command /?^b
for quick help on the command line.
^bNote:^b If the internal NDOS BE command can't find the
referenced command, for example, it's a filename for a BE
script file in the form:
BE script-file [[GOTO] label]
NDOS will look for BE.EXE in the path and execute that
instead, passing the rest of the command to it. The following
BE commands have no meaning in NDOS as they occur only in BE
script files:
BE EXIT
BE GOTO
BE JUMP
See ^rBE ASK^r, ^rBE BEEP^r, ^rBE BOX^r, ^rBE CLS^r, ^rBE DELAY^r, ^rBE EXIT^r,
^rBE GOTO^r, ^rBE JUMP^r, ^rBE MONTHDAY^r, ^rBE PRINTCHAR^r, ^rBE REBOOT^r,
^rBE ROWCOL^r, ^rBE SA^r, ^rBE SHIFTSTATE^r, ^rBE TRIGGER^r, ^rBE WEEKDAY^r,
and ^rBE WINDOW^r.
^bSYNTAX
(Internal NDOS/External Norton BE)^b
BE ASK "prompt" [key-list] [DEFAULT=key] [TIMEOUT=n]
[ADJUST=n] [color] [/DEBUG]
^bPURPOSE^b
Request input from the keyboard and set the DOS ERRORLEVEL
code.
^bCOMMENTS^b
BE ASK prompts the user for a response to a question. This
allows you to create interactive batch files that support
conditional branching.
A default key can be set if the user presses Enter and a
default timeout period can be specified. The key selected is
returned as an exit code, which can be adjusted with an
offset.
The options are:
^bprompt^b
Text string to display when the command runs.
If the prompt string has embedded commas
and/or spaces, the entire string must be
enclosed in quotes. Use two quotes together
if you do not want to display a prompt.
^bkey-list^b List of response keys (characters or
numbers).
^bDEFAULT^b
Key returned if no key is pressed within the
timeout period, or if the user presses Enter.
^bTIMEOUT^b
Time in seconds before the default key is
returned. If n is zero, or no timeout is
specified, ASK will wait forever.
^bADJUST^b
Adds the return value to this amount.
^bcolor^b
SA (Screen Attribute) format color
specification for the text of the prompt
(see BE SA).
The /DEBUG option displays the ERRORLEVEL value returned.
A beep is generated if the user presses a key that is not in
the designated key-list.
^bEXAMPLE^b
The following batch file fragment can be used as part of a
menu system:
be ask "Run the (E)ditor, D(atabase) or Q(uit)?" edq
if errorlevel 3 goto quit
if errorlevel 2 goto database
if errorlevel 1 goto editor
^bSYNTAX
(Internal NDOS/External Norton BE)^b
BE BEEP [/Dn] [/Fn] [/Rn] [/Wn]
BE BEEP [pathname [/E]]
^bPURPOSE^b
Specify the frequency and duration of a tone through the
speaker.
^bCOMMENTS^b
BE BEEP uses the system speaker to create tones based on the
specified frequency and duration. Use them to signal error
conditions or the completion of a task.
The options are:
^b/Dn^b Duration of the tone, in 1/18ths of a second.
^b/Fn^b Frequency of the tone, where n is cycles per
second (Hertz).
^b/Rn^b Repeat the tone n times.
^b/Wn^b Wait between tones n/18ths of a second.
^b/E^b
Echo the quoted text in comments.
BE BEEP can also play notes from a script file. This is a
text file with a list of switches. Comments can be placed in
the script file following the switches, but must be preceded
by a semicolon. Parts of comments enclosed in quotes will
display when the script file is run.
^bNote:^b NDOS does not directly support script files. If one
is entered on the command line, NDOS will attempt to locate
the Norton BE.EXE program and pass the command line to it.
See also ^rBEEP^r for a frequency table.
^bEXAMPLE^b
Play the note "A" for 2 seconds and repeat 3 times. Pause
for 1 second between notes:
be beep /f440 /d36 /r3 /w18
The following script file, 2NOTE, plays two different notes:
/f330 /d10 /r2 /w5; that was "mi"
/f440 /d10 /r3 /w5; that was "sol"
be beep 2note
To also display the words "mi" and "sol" use:
be beep 2note /e
^bSYNTAX
(Internal NDOS/External Norton BE)^b
BE BOX top, left, bottom, right [SINGLE | DOUBLE] [color]
^bPURPOSE^b
Draw a rectangle at a specified location on the screen.
^bCOMMENTS^b
BE BOX draws boxes of various shapes, sizes, and colors at a
specified location on the screen. The boxes can have single
or double line borders. The boxes are not filled, so any
text within the confines of the box is not overwritten.
The options are:
^btop^b
Row for upper left corner of box.
^bleft^b
Column for upper left corner of box.
^bbottom^b
Row for lower right corner of box.
^bright^b
Column for lower right corner of box.
^bSINGLE^b
Single line outline.
^bDOUBLE^b
Double line outline.
^bcolor^b
SA (Screen Attribute) format color
specification for the box (see BE SA).
The default box is double line.
See also ^rDRAWBOX^r.
^bEXAMPLE^b
Draw a red box on a green background with a single-line
border:
be box 10 10 20 40 single red on green
^bSYNTAX
(Internal NDOS/External Norton BE)^b
BE CLS [color]
^bPURPOSE^b
Clears the screen, optionally using the specified attribute.
^bCOMMENTS^b
BE CLS will clear the screen using the attribute at the
current cursor location or the attribute specified on the
command line. One reason for clearing the screen with a
certain attribute is that other Batch Enhancer commands such
as ROWCOL, ASK, and BOX will use the existing screen
attributes if no color is specified on the command line. By
setting the screen to a certain attribute ahead of time,
other Batch Enhancer commands can be smaller and faster.
The only option is:
^bcolor^b
Use the SA (Screen Attribute) format for the
color specification.
See also ^rBE SA^r and ^rCLS^r.
^bEXAMPLE^b
Clear the screen and set colors to a red foreground on a
green background:
be cls red on green
^bSYNTAX
(Internal NDOS/External Norton BE)^b
BE DELAY ticks
^bPURPOSE^b
Pause execution of a batch file for a specified length of
time.
^bCOMMENTS^b
BE DELAY pauses execution of a batch file for the specified
number of clock ticks. The batch file resumes when the time
has elapsed.
The only option is:
^bticks^b
Each clock tick is 1/18 of a second.
See also ^rDELAY^r.
^bEXAMPLE^b
Pause execution for one-half second:
be delay 9
^bSYNTAX
(External Norton BE)^b
BE EXIT
^bPURPOSE^b
Terminate execution of a Batch Enhancer script-file, before
the end of the file is reached.
^bCOMMENTS^b
The BE EXIT command is used only in Batch Enhancer
script-files and has no meaning if executed directly from
^bEXAMPLE^b
The following script file, COLOR.DAT, prompts for a numeric
entry and then changes the screen colors according to the
number pressed.
ask "1=White/Black, 2=White/Blue, 3=Abort " 123 DEFAULT=3
jump onblack, onblue, nochange
:onblack
sa white on black
exit
:onblue
sa bright white on blue
:nochange
To execute the script, use:
be color.dat
See also ^rBE ASK^r and ^rBE JUMP^r.
^bSYNTAX
(External Norton BE)^b
BE script-file [[GOTO] label]
^bPURPOSE^b
Specify where execution should begin in a Batch Enhancer
script-file.
^bCOMMENTS^b
The BE GOTO command is used to start execution of a
^bscript-file^b at a line other than the beginning. The GOTO
token itself is optional, as long as a label is defined after
the name of the script-file.
The conventions used for labels are the same as in DOS. The
label must start with a colon (:) and exist on its own line
within the script-file.
The BE GOTO options are:
^bscript-file^b A Batch Enhancer script-file.
^blabel^b
A valid label that exists inside a
script-file.
BE GOTO differs from the DOS batch command GOTO in that it
only works with Batch Enhancer script-files.
BE JUMP is used for conditional branching within a script
file, while BE GOTO is used for a conditional entry point
into the script file.
See also ^rBE JUMP^r.
^bEXAMPLE^b
The following script file, COLOR.DAT, prompts for a numeric
entry and then changes the screen colors according to the
number pressed.
ask "1=White/Black, 2=White/Blue, 3=Abort " 123 DEFAULT=3
jump onblack, onblue, nochange
:onblack
sa white on black
exit
:onblue
sa bright white on blue
:nochange
To execute the script beginning at the second label, use:
be color.dat goto onblue
See also ^rBE EXIT^r and ^rBE JUMP^r.
^bSYNTAX
(External Norton BE)^b
JUMP label1 [, label2 [,
., labelN]] [/DEFAULT:label]
^bPURPOSE^b
Branch to a label in a Batch Enhancer script-file based
on the exit code (ERRORLEVEL) of the previous command.
^bCOMMENTS^b
The exit code is used as an offset into the series of labels;
execution continues at the appropriate label.
The BE JUMP options are:
label
A valid label that appears in the script-file.
/DEFAULT:label The label to branch to if the exit code is
zero, or if the exit code is greater than
the number of labels supplied.
The BE JUMP command only appears in script-files and has no
meaning if executed directly from DOS.
BE JUMP is used for conditional branching within a script
file, while BE GOTO is used for a conditional entry point
into the script file.
See also ^rBE GOTO^r, ^rBE EXIT^r, ^rBE ASK^r, ^rBE WEEKDAY^r, ^rBE MONTHDAY^r,
and ^rBE SHIFTSTATE^r.
^bEXAMPLE^b
The following script file, COLOR.DAT, prompts for a numeric
entry and then changes the screen colors according to the
number pressed.
ask "1=White/Black, 2=White/Blue, 3=Abort " 123 DEFAULT=3
jump onblack, onblue, nochange
:onblack
sa white on black
exit
:onblue
sa bright white on blue
exit
:nochange
To execute the script, use:
be color.dat
^bSYNTAX
(Internal NDOS/External Norton BE)^b
BE MONTHDAY [/DEBUG]
^bPURPOSE^b
Returns the day of the month.
^bCOMMENTS^b
BE MONTHDAY returns a number (1 to 31) to the batch file as
an exit code. This can be tested with the IF ERRORLEVEL
command.
The only option is:
/DEBUG Display the ERRORLEVEL value returned.
^bEXAMPLE^b
Find out the day of the month and display it on the screen:
be monthday /debug
^bSYNTAX
(Internal NDOS/External Norton BE)^b
BE PRINTCHAR character, count [color]
^bPURPOSE^b
Display a character.
^bCOMMENTS^b
BE PRINTCHAR displays a specified character a given number
of times at the current cursor location. The character can
be repeated up to 132 times. (The Norton BE limit is 80.)
The options are:
^bcharacter^b Character to display.
^bcount^b
Number of times to display.
^bcolor^b
SA (Screen Attribute) format color
specification (see BE SA).
See also ^rSCRPUT^r and ^rSCREEN^r.
^bEXAMPLE^b
be printchar X,30 blue on red
^bSYNTAX
(Internal NDOS/External Norton BE)^b
BE REBOOT
^bPURPOSE^b
Perform a warm boot of the computer.
^bSYNTAX^b
BE REBOOT [/V] [/C]
^bCOMMENTS^b
BE REBOOT provides the ability to boot the computer from a
batch file. This is useful in the construction of batch
files that affect system configuration.
The options are:
^b/V^b
Verify: Prompt the user to confirm the reboot.
^b/C^b
Cold: Perform a cold boot.
^bNote:^b Some memory managers or TSRs may interfere with REBOOT.
^bEXAMPLE^b
To warm boot the computer with a Y/N prompt:
be reboot /v
^bSYNTAX
(Internal NDOS/External Norton BE)^b
BE ROWCOL row col ["text"] [color]
^bPURPOSE^b
Position the cursor at the specified row and column location,
optionally displaying text.
^bCOMMENTS^b
BE ROWCOL provides control over the cursor position so that
text can be written anywhere on the screen. After setting
the cursor, the next command that displays text will display
it at the current cursor location. BE ROWCOL can also save a
step and display a line of text with an optional color
specification.
^brow^b
Row to move the cursor to.
^bcol^b
Column to move the cursor to.
^btext^b
Optional line of text to display.
^bcolor^b
SA (Screen Attribute) format color
specification.
See also ^rBE SA^r, ^rSCRPUT^r, and ^rSCREEN^r.
^bEXAMPLE^b
Display text near the top center of the screen:
be rowcol 1 27 "Kilroy was here!" blue on green
^bSYNTAX
(Internal NDOS/External Norton BE)^b
BE SA NORMAL|UNDERLINE|REVERSE [/N]
BE SA [BRIGHT|BLINKING] foreground [ON background] [/N] [/CLS]
^bPURPOSE^b
Control the display of colors and attributes.
^bCOMMENTS^b
BE SA (screen attributes) takes two forms.
The first form sets the display to underline or reverse video.
The UNDERLINE option is only available on monochrome monitors
(it will be a blue foreground on a color monitor).
The NORMAL option is used to undo an UNDERLINE or REVERSE
setting.
The second form of BE SA sets screen colors and high
intensity or blinking. BRIGHT or BOLD can be used to specify
high intensity.
The SA format color settings are also used with the BE ASK,
BE BOX, BE CLS, BE PRINTCHAR, BE ROWCOL, and BE WINDOW
commands.
The available colors for foreground and background are the
following:
WHITE
BLACK
MAGENTA
BLUE
GREEN
CYAN
YELLOW
The options are:
^b/N^b
Do not set the border color (defaults to
same color as background).
^b/CLS^b Clears the screen after setting the attributes.
See also ^rCOLOR^r.
^bEXAMPLE^b
Set the display to reverse video:
be sa reverse
Set the display to high intensity blue on red:
be sa bright blue on red
^bSYNTAX
(Internal NDOS/External Norton BE)^b
BE SHIFTSTATE [/DEBUG]
^bPURPOSE^b
Report the status of the Shift keys, the Alt key, and the
Ctrl key.
^bCOMMENTS^b
The BE SHIFTSTATE command returns an exit code (ERRORLEVEL)
that defines the status of the Left Shift, Right Shift, Alt
key, and Ctrl key at the time it is run. SHIFTSTATE will
return the following exit codes for the four keys, which can
be added together for multiple keys:
^b1^b
Right Shift key
^b2^b
Left Shift key
^b4^b
Ctrl key (left or right)
^b8^b
Alt key (left or right)
The only option is:
^b/DEBUG^b Displays the ERRORLEVEL value returned.
^bEXAMPLE^b
Display the shift state:
be shiftstate /debug
^bSYNTAX
(Internal NDOS/External Norton BE)^b
BE TRIGGER hh:mm [am|pm]
^bPURPOSE^b
Halt execution of a batch file until the time specified.
^bCOMMENTS^b
BE TRIGGER allows a batch file to be paused until a
specified time. The time, hh:mm, can be entered in 24-hour
format or in 12-hour format with the AM and PM options.
12:00 am is same as midnight and 12:00 pm is the same as
noon.
^bEXAMPLE^b
Pause execution of a batch file until 1:00 in the afternoon:
be trigger 1:00 pm
Press Ctrl-Break or Ctrl-C to cancel.
^bSYNTAX
(Internal NDOS/External Norton BE)^b
BE WEEKDAY [/DEBUG]
^bPURPOSE^b
Return the day of the week to the batch file as an exit code
(ERRORLEVEL).
^bCOMMENTS^b
Sunday is returned as 1, and Saturday is returned as 7. The
exit code can be tested with the DOS IF ERRORLEVEL command.
The only option is:
/DEBUG Display the ERRORLEVEL value returned.
^bEXAMPLE^b
Find out the day of the week and display it on the screen:
be weekday /debug
^bSYNTAX
(Internal NDOS/External Norton BE)^b
BE WINDOW top, left, bottom, right [color] [ZOOM | EXPLODE]
[SHADOW]
^bPURPOSE^b
Draw a solid rectangle, optionally using a drop shadow and a
zoom effect.
^bCOMMENTS^b
BE WINDOW draws solid boxes of various shapes, sizes, and
colors at a specified location on the screen. The boxes have
a double-line border. The boxes are solid filled; any text
within the confines of the box is overwritten.
The options are:
^btop^b
Row for upper left corner of box.
^bleft^b
Column for upper left corner of box.
^bbottom^b
Row for lower right corner of box.
^bright^b
Column for lower right corner of box.
^bcolor^b
SA (Screen Attribute) format color
specification for the window.
^bZOOM^b
Zooms the window while drawing it (EXPLODE is
a synonym).
^bSHADOW^b
Adds a see through drop "shadow" to the
window.
See also ^rBE SA^r.
^bEXAMPLE^b
Draw a shadow box on the screen:
be window 10 10 20 40 red on blue shadow
^bSYNTAX
(Internal/External DOS)^b
APPEND [[drive:]path[;
.]] [/X[:ON|:OFF]] [/PATH:ON|/PATH:OFF] [/E]
APPEND
APPEND ;
^bPURPOSE^b
Forces DOS to search the specified directories when looking
for files, including data files.
^bCOMMENTS^b
^uThis is a dangerous command^u and could cause you to update,
overwrite or delete files in the wrong directory. If you must
use APPEND, set the APPEND path to an empty string except when
the applications that need APPEND are actually running.
Use of APPEND should be unnecessary except for older
applications or those which do not provide adequate mechanisms
for you to specify where the application's files are stored.
^uCAUTION:^u Before using APPEND with NDOS, read the section on
APPEND in the NDOS manual.
APPEND without any parameters displays the current append
search path.
APPEND with just a semicolon clears the APPEND search path.
The APPEND options are:
^b/X[:ON]^b
DOS ^uwill search^u the appended directories for
executable files (":ON" is optional). If you
intend to switch this capability on and off,
/X:ON (or /X) must be specified the first time
you use APPEND.
^b/X:OFF^b
DOS ^uwill not search^u the appended directories
for executable files.
^b/PATH:ON^b
DOS ^uwill search^u the appended directories for
data files even if the path is specified with
the filename. The default is /PATH:ON.
^b/PATH:OFF^b DOS ^uwill not search^u the appended directories
for data files.
^b/E^b Store the APPEND path in the environment. This
option must be specified the first time APPEND
is loaded.
^uNOTE:^u The /E switch is not compatible with NDOS.
APPEND is memory-resident, and uses about 9K of RAM (DOS 5.0).
^bSYNTAX
(External DOS)^b
ASSIGN [x=y [
ASSIGN [/STATUS]
^bPURPOSE^b
Routes disk I/O requests to a different drive.
^bCOMMENTS^b
ASSIGN allows you to use programs that use a pre-assigned disk
drive (such as A or B) with another drive (such as C). The
first argument specifies the drive whose assignment you want
to change, and the second argument is the new assignment. The
equal sign (=) is optional. Do not use a colon after the drive
letters for DOS versions earlier than 5.0.
ASSIGN with no operands clears all assignments.
Reassignment of drives should only be done when necessary. It
should never be used with BACKUP, LABEL, PRINT or RESTORE; and
ASSIGN should not be used with drives that have been ^rJOIN^red
or ^rSUBST^rituted. DISKCOMP, DISKCOPY and FORMAT ignore drive
reassignments.
The only ASSIGN option is:
^b/STATUS^b List the current assignments.
ASSIGN is memory-resident, and uses about 1.5K of RAM.
See also ^rJOIN^r and ^rSUBST^r.
^bEXAMPLES^b
Route all requests for drive A to drive C:
c:\> assign A=C
Clear current assignments.
c:\> assign
List current assignments.
c:\> assign /status
^bSYNTAX
(External DOS)^b
BACKUP source destination-drive:
[/A] [/D:date [/T:time]] [/F[:size]] [/L[:file]] [/M] [/S]
^bPURPOSE^b
Backs up files from one disk to another.
^bCOMMENTS^b
The first argument is the ^usource^u which can be a drive,
directory, or filename. You can use the wildcard characters
(* and ?) in the source filename. The second argument is the
^udestination^u which is a disk drive.
The BACKUP options are:
^b/A^b Add files to be backed up to the files already on the
backup disk.
^b/D:date^b Back up files modified on or after the specified
date (the date format depends on the current country
setting).
^b/T:time^b Back up all files modified on or after the
specified time on the specified date (/D) (time is in
the format hh:mm:ss). If no date is specified, this
parameter selects files modified on or after the
specified time on all days.
^b/F[:size]^b Format the target disk to a size other than
the default size of the drive. BACKUP will format an
unformatted disk, even if /F is not specified.
FORMAT.COM must be in the current directory or in a
directory on the current path. Valid sizes are 160,
180, 320, 360, 720, 1200, 1440, or 2880 kilobytes.
^b/L^b Log: Keep a log of the backup. If a filename is not
specified, BACKUP keeps a log on BACKUP.LOG in the
root directory of the source drive. If the log file
exists, the information is appended to that log.
^b/M^b Modified: Back up only those files that have been
modified since the last backup (those with the archive
bit set).
^b/S^b Subdirectory: Back up subdirectory files in addition
to the specified directory.
BACKUP may not work correctly if used on a drive that has been
ASSIGNed or SUBSTituted, or when a JOIN or APPEND is in
effect.
See also ^rREPLACE^r, ^rRESTORE^r and ^rXCOPY^r.
^bEXAMPLE^b
Back up the fixed disk C to multiple floppies on A:
c:\> backup c: a: /s
Back up all the files with a .DOC extension in the C:\WP
directory to A:
c:\> backup c:\wp\*.doc a:
^bSYNTAX
(External DOS)^b
CHKDSK [drive:][path][filename] [/F][/V]
^bPURPOSE^b
Checks the disk directories, files, and FAT, and reports on
the disk and memory status.
^bCOMMENTS^b
If you specify a filename, CHKDSK will check the disk for
fragmentation and display a status report for the file. You
can use the DOS wildcard characters (* and ?) in the filename.
The CHKDSK options are:
^b/F^b Try to fix errors in the directory or FAT.
^b/V^b Displays all files and their paths on the specified
drive.
If the /F option is specified, CHKDSK will attempt to correct
any errors it finds. If /F is not specified, CHKDSK will
analyze the disk for errors but will not attempt to correct
them.
See your DOS manual for more information on CHKDSK.
See also ^rFREE^r and ^rMEMORY^r.
^bEXAMPLE^b
Check drive C and correct any errors:
c:\> chkdsk c: /f
^bSYNTAX
(External DOS)^b
COMMAND [[drive:]path] [device] [/E:n] [/P] [/C string] [/MSG]
^bPURPOSE^b
Load a secondary command processor.
^bCOMMENTS^b
When a secondary command processor is loaded, it creates a
new DOS environment, though it inherits the environment
values previously set. When the secondary command processor
is terminated by the EXIT command (or the use of the /C
switch), the environment belonging to the primary command
processor is restored.
If COMMAND.COM does not reside in the root directory, its
location must be specified with ^bdrive:path^b so the transient
portion can be reloaded when necessary. This location is
stored in the COMSPEC environment variable.
Another DOS ^bdevice^b can also be specified for command input
and output.
The COMMAND options are:
^b/E:n^b
Environment size from 160 up to 32,768
bytes. Default is 256.
^b/P^b
Make secondary command processor permanent.
^b/C string^b Execute the command specified by string
and then return to primary command processor.
^b/MSG^b
Place text of all parse and extended error
messages in memory; /P must also be specified.
This will only be useful when running DOS from
floppy disks.
See your DOS manual for more information on COMMAND.
See also ^rNDOS^r and ^rEXIT^r.
^bEXAMPLE^b
Load a secondary processor, execute a command, and terminate:
command /c c:\dos\append c:\dbase
This loads the secondary command processor, which then
executes the APPEND command and terminates. This technique
may be of value if you wish to run APPEND from within NDOS.
See the NDOS manual for more information about APPEND.
^bSYNTAX
(External DOS)^b
COMP [drive:][path]filename [drive:][path]filename
[/D] [/A] [/L] [/N=x] [/C]
^bPURPOSE^b
Compares files.
^bCOMMENTS^b
COMP compares individual files or sets of files byte for byte.
To compare sets of files, specify only the drive, the path,
or use the DOS wildcard characters (* and ?) in the filenames.
If one or both parameters are missing or if no file matches
the primary parameter, you will be prompted to enter both
filenames. If a path is specified without a filename, COMP
assumes all files in the directory (*.*).
If the file sizes differ, COMP does not make the comparison
unless the /N switch is specified.
COMP will display an error message for any location (the byte
offset) containing mismatched information between the two
files. After ten mismatches, COMP aborts the compare.
The COMP options are:
^b/D^b
Decimal: Display differences in decimal rather
than hexadecimal format.
^b/A^b
ASCII: Display differences as characters.
^b/L^b
Line number: Show differences by line number
rather than byte offset.
^b/N=x^b
Number of lines: Compare the first x lines,
even if the files are different sizes.
^bC^b
Case: Ignore uppercase and lowercase differences.
See also ^rDISKCOMP^r and ^rFC^r.
^bEXAMPLE^b
Compare the files MEMO.DOC and MEMO.BAK:
c:\> comp memo.doc memo.bak
^bSYNTAX
(External DOS)^b
DEBUG [drive:][path]filename [parameters]
DEBUG
^bPURPOSE^b
Test and debug binary files. Monitor the contents of
registers and execute programs one instruction at a time.
^bCOMMENTS^b
DEBUG can be loaded with a specified filename and any
parameters for test purposes. Alternatively, you can enter
all commands at the debug prompt.
The following table summarizes the DEBUG commands:
Assemble
A [address]
Compare
C range address
Dump
D [range]
Enter
E address [list]
Fill
F range list
G[=address] [break0 [
. break9]]
H value value
Input
I port
Load
L [address [drive sector number]]
Move
M range address
Name
N filename [parameter
Output
O port byte
Proceed
P[=address] [count]
Quit
Register
R [register]
Search
S range list
Trace
T[=address] [count]
Unassemble U [range]
Write
W [address [drive sector number]]
Allocate
XA pages
Deallocate XD handle
Map pages
XM lpage ppage handle
Status
^baddress
^bstarting memory location
^bbreak
^bbreakpoint address, up to 10 can be specified
^bbyte
^bhexadecimal value from 0 to FF
^bcount
^bnumber of instructions to execute (default is 1)
^bdrive
^bdisk drive, 0=A, 1=B, 2=C, and so on
^bfilename ^bfile to Load or Write
^blist
^bone or more hex bytes; or a string enclosed in
single or double quotes
^bnumber
^bnumber of consecutive sectors to load, 0 to
^bparameter ^badditional parameters for filename
^bport
^bport address from 0 to
^brange
^bstarting address and ending address, or starting
address and length in bytes.
^bregister ^btwo character name for a register
^bsector
^bnumber of first sector to load (0 to
^bvalue
^bhexadecimal number from 0 to
^bpages
^bthe number of 16K pages to allocate (hex)
^bhandle
^bthe handle assigned by XA command
^blpage
^blogical page
^bppage
^bphysical page
See your DOS manual for more information on DEBUG.
^bSYNTAX
(External DOS)^b
DISKCOMP [drive:] [drive:] [/1] [/8]
^bPURPOSE^b
Compare the contents of two diskettes.
^bCOMMENTS^b
DISKCOMP compares diskettes on a track-for-track basis. It
will not work on fixed or virtual disks.
DISKCOMP does not recognize drive assignments made with
ASSIGN.
The DISKCOMP options are:
^b/1^b Compare only the first side of the disks.
^b/8^b Compare only 8 sectors per track.
If no drive is specified, DISKCOMP uses the default drive. If
one drive is specified, the default drive is used as the
second drive for comparison. DISKCOMP will prompt for disk
changes if the comparison is between two disks in the same
drive.
See also ^rDISKCOPY^r.
^bEXAMPLE^b
Compare the disks in A and B:
c:\> diskcomp a: b:
^bSYNTAX
(External DOS)^b
DISKCOPY [drive:] [drive:] [/1] [/V]
^bPURPOSE^b
Make exact, track-for-track copies of diskettes.
^bCOMMENTS^b
DISKCOPY copies diskettes only. It will not work on fixed,
network or virtual (RAM) disks, or on drives that have been
ASSIGNed, JOINed or SUBSTituted.
The first drive is the source, the second drive is the target.
If no drive is specified, DISKCOPY uses the default drive as
both source and target. If one drive is specified, the
default drive is used as the target. DISKCOPY will prompt
for disk changes if the comparison is between two disks in
the same drive.
DISKCOPY will format target disks that are unformatted, using
exactly the same format as the source disk.
If the source drive has a volume serial number, a new serial
number is created for the target disk.
The DISKCOPY options are:
^b/1^b Copy only the first side of the diskette.
^b/V^b Verify: Makes sure that each sector can be read
after data is written to it.
See also ^rCOPY^r, ^rXCOPY^r and ^rDISKCOMP^r.
^bEXAMPLE^b
Make a copy of the diskette in drive A to drive B:
c:\> diskcopy A: B:
^bSYNTAX
(External DOS)^b
DOSKEY [/REINSTALL] [/BUFSIZE=size] [/M] [/H]
[/INSERT|/OVERSTRIKE]
DOSKEY [macroname=[text]]
^bPURPOSE^b
Recall DOS commands, edit command lines, and create macros.
^bCOMMENTS^b
DOSKEY is a memory resident program (about 4K of RAM).
^bNote:^b If you are using NDOS, the built-in command
line editing capability overrides DOSKEY.
A ^bmacro name^b can be assigned to any sequence of characters.
To clear a macro, enter the name followed by just an equal (=)
sign.
The following special symbols (uppercase or lowercase) can be
used when defining a macro:
Redirect output to a device or a file (like ">").
$G$G
Append output to the end of a file (like ">>").
Redirect input (like "<").
Send the macro output to a command (like a
pipe "|").
Separate multiple commands on one line.
The dollar sign character.
$1 to $9 Passed parameters on the command line (like %1
in a batch file).
Pass the complete command line after the macro
name.
The DOSKEY options are:
/REINSTALL
Install a new copy of DOSKEY.
/BUFSIZE=size
Size of buffer in bytes to store commands.
Minimum is 256, default is 512.
Macros: List all DOSKEY macros.
History: List all commands stored in memory.
/INSERT
Characters are inserted into text.
/OVERSTRIKE
Characters are overwritten.
See your DOS manual for more information on DOSKEY and a table
of keystroke actions.
See also the ^r-EDITING-^r entry in this reference.
^bEXAMPLE^b
Create a macro to make a new directory and then change to it:
doskey mcd=md $1$tcd$1
^bSYNTAX
(External DOS)^b
DOSSHELL [/T|/G[:screen[n
] [/B]
^bPURPOSE^b
A graphical interface to replace the DOS command line.
^bCOMMENTS^b
DOSSHELL is a menu system for DOS with files and tasks
selected from lists. Task switching and the use of a mouse is
supported.
The DOS shell is configured for your system during DOS
installation. You can change the DOSSHELL options, including
color and resolution, from the program's menus.
Press Tab to move among the windows on the screen. Press F10
and then Enter to access the top line menus (or press Alt and
the first letter of the menu).
To access the DOS prompt from within the shell, press
Shift-F9. Type EXIT and press Enter to return to the shell
(don't enter DOSSHELL again or you will reload the shell and
waste memory). To quit the shell, press Alt-F4.
The DOSSHELL options are:
^b/T^b
Text mode.
^b/G^b
Graphics mode.
^bscreen^b Screen resolution: valid choices are ^bL^b (low),
^bM^b (medium), or ^bH^b (high). The default value for
screen is hardware dependent. Values for ^bn^b are
none, ^b1^b, or ^b2^b, if more than one choice is
available at a given resolution.
^b/B^b
Black and white.
See your DOS manual for more information on DOSSHELL.
^bEXAMPLE^b
Load the DOS shell:
dosshell
Load the DOS shell in high resolution graphics mode with 60
lines on a VGA display:
doshhell /g:h2
^bSYNTAX
(External DOS)^b
EDIT [[drive:][path]filename] [/B] [/G] [/H] [/NOHI]
^bPURPOSE^b
Create, save, edit, or print ASCII files.
^bCOMMENTS^b
EDIT is a full-screen editor to use with text files -- a
big improvement over EDLIN -- including extensive online
help (press F1).
QBASIC.EXE must reside in the current directory, the same
directory as EDIT.COM, or be available on the search PATH in
order to use EDIT.
After loading EDIT, press the Alt key and then Enter to access
the menus on the top line of the screen. Alternatively, press
Alt and the first letter of the menu name.
The EDIT options are:
^b/B^b
Black and white on a color display.
^b/G^b
Faster updates for CGA displays (don't use
this option if you see "snow").
^b/H^b
Run EDIT with the maximum number of lines
available on the screen.
^b/NOHI^b Use EDIT in 8 rather than 16 colors.
See your DOS manual for more information on EDIT.
See also ^rEDLIN^r.
^bEXAMPLE^b
To edit your AUTOEXEC.BAT file:
edit c:\autoexec.bat
^bSYNTAX
(External DOS)^b
EDLIN [drive:][path]filename [/B]
^bPURPOSE^b
Create or modify text files.
^bCOMMENTS^b
Use EDLIN to write short batch files or make small changes to
text files. EDLIN is useful because it is available on any
DOS system and can be used to enter control codes.
To enter a control code press Ctrl-V and then the character
(use uppercase for a text character). For example, Ctrl-V
followed by [ generates an Escape character.
The only EDLIN option is :
^b/B^b Ignore embedded Ctrl-Z (end of file) characters
and load the file based on actual file size.
EDLIN commands can be entered in uppercase or lowercase:
Append
[number]A
Copy
[line],[line],line[,count]C
Delete
[line][,line]D
Edit a line
[line]
End and save
Insert
[line]I
List lines
[line][,line]L
Move lines
[line],[line],lineM
Page
[line][,line]P
Quit edit
Replace text
[line][,line] [?]R [string][F6 string]
Search
[line][,line] [?]S [string]
Transfer
[line]T: [d:]filename
Write
[number]W
^bnumber^b Number of lines to append or write.
^bline^b
Line number within a file (from 1 to 65,534). You
can also use . to indicate the current line (last line
edited) or # to indicate last line in memory plus 1.
^bcount^b
Number of times to copy.
^bstring^b Text to search for or replace.
^b?^b
Prompt before continuing during text search
or replace operation.
^bF6^b
The F6 function key.
Line numbers are either absolute or relative. For relative
line numbers, use a + or - sign. For example, +5 means five
lines from the current line towards the end of the file.
EDLIN uses the following keys for recalling and editing text
lines:
^bF1^b
Re-enter last line one letter at a time.
^bF2^b
Re-enter last line up to indicated character.
^bF3^b
Re-enter entire last line.
^bF4^b
Skip portion of last line up to indicated
character.
^bF5^b
Replace last line in memory with the new line.
^bIns^b
Insert characters.
^bDel^b
Delete next character.
^bBackspace^b Erase last character.
^bEscape^b
Ignore present line.
^bCtrl-C^b
Stop the line entry.
See your DOS manual for more information on EDLIN.
See also ^rEDIT^r and ^rDEBUG^r.
^bSYNTAX
(External DOS)^b
EMM386 [ON|OFF|AUTO] [W=ON|W=OFF]
^bPURPOSE^b
Enable, disable, or report the status of expanded memory
support on a 80386 or higher system. Enable or disable the
Weitek math coprocessor.
^bCOMMENTS^b
To use the EMM386 command, you must be using an 80386 or
higher system and EMM386.EXE must be installed as a device
driver from your CONFIG.SYS file.
Enter EMM386 with no parameters to display the current status
of EMM386 expanded memory.
The EMM386 options are:
^bON^b
Enable expanded memory.
^bOFF^b
Disable expanded memory. You will not be able to
disable expanded memory if a program in memory
requires its use or UMBs (upper memory blocks)
are being used.
^bAUTO^b Enable expanded memory only when a program
requires its use (default is ON).
^bW=ON^b Enable Weitek math coprocessor support (default
is OFF).
^bW=OFF^b Disable Weitek coprocessor support.
See your DOS manual for information on how to install
EMM386.EXE as a device driver.
See also ^rMEM^r.
^bEXAMPLE^b
Report the status of EMM386 expanded memory.
emm386
^bSYNTAX
(External DOS)^b
EXE2BIN [drive:][path]source [drive:][path][target]
^bPURPOSE^b
Convert .EXE (executable) files to binary-image files.
^bCOMMENTS^b
EXE2BIN converts a valid .EXE file, produced by a suitable
linker, into a memory-image file in binary format.
If the ^bsource^b filename is specified without a file extension,
EXE is assumed. If the ^btarget^b filename is omitted, the source
name is used with the extension BIN. If the target is specified
without an extension, BIN is used.
^bNote:^b Not all EXE files can be converted. The code and
data portion of the EXE file must be less than 64K in
size. There can be no STACK segment.
Two types of conversion are possible with EXE2BIN. To convert
to a COM file, CS:IP (the Code Segment:Instruction Pointer)
must bet set to 100H by the compiler instruction ORG. For a
pure binary conversion, you are prompted for the fixup value
if the program requires segment relocation.
EXE2BIN will not be useful unless you are a programmer.
See your DOS manual for more information on EXE2BIN.
^bSYNTAX
(External DOS)^b
EXPAND [drive:][path]filename
. destination
^bPURPOSE^b
Expand compressed files on DOS distribution disks.
^bCOMMENTS^b
In order to conserve disk space on the DOS distribution
disks, the files are stored on disk in a compressed form and
are expanded as part the DOS installation program. The
compressed files are named with an underscore (_) as the last
character of the file extension. Use EXPAND if you need to
copy a file or files from the distribution disks.
The file PACKING.LST lists the files on each distribution
disk (found on Disk 3 for MS-DOS, 5.25 inch).
Wildcards (* and ?) cannot be used for the ^bfilename^b, but
you can list more than one file on the command line. If you
are expanding a single file, you can specify a different
filename for the ^bdestination^b. For more than one file, the
^bdestination^b must be a drive or directory.
^bEXAMPLE^b
To expand the CHKDSK file from the DOS distribution disk:
expand a:chkdsk.ex_ c:\dos\chkdsk.exe
^bSYNTAX
(External DOS)^b
FASTOPEN drive:[=
. [/X]
^bPURPOSE^b
Save information on recently-opened files in memory to speed
disk access.
^bCOMMENTS^b
When possible, use of disk cache software such as the Norton
Cache provides more flexibility and more significant
performance improvement than use of FASTOPEN.
The FASTOPEN parameters are:
^bdrive:^b Drive letter of the fixed disk drive to process.
Floppy disk drives, network drives, and drives
created by JOIN, SUBST or ASSIGN may not be used.
The number of directory or file entries to retain
for the drive. The value must be between 10 and
9; the default is 48. This parameter should be
larger than the maximum number of nested sub-
directories in the system.
^b/X^b
Store the cache of names in expanded memory.
Too small a value of
n will provide little performance
improvement. Too large a value will unnecessarily increase
DOS's overhead while it searches the list, and may therefore
degrade performance.
FASTOPEN is memory-resident, and uses about 3K of RAM.
Additional memory used to store FASTOPEN's internal file list
will be (35*
n) bytes.
^bEXAMPLE^b
Initialize FASTOPEN for hard disk C:, with room to store
information on the last 64 files accessed.
fastopen c:=64
^bSYNTAX
(External DOS)^b
FC [/A] [/C] [/L] [/LB n] [/W] [/N] [/T] [/nn]
[drive:][path]primary [drive:][path]secondary
^bPURPOSE^b
Compare two files or sets of files for differences.
^bCOMMENTS^b
FC performs either a line-by-line or a byte-by-byte comparison
of the ^bprimary^b and ^bsecondary^b files. For multiple file
comparisons, use the DOS wildcards (* and ?) in the file
specifications. FC defaults to a line-by-line (/L) comparison
of files, unless the file extensions are EXE, COM, SYS, OBJ,
LIB, or BIN.
For a line-by-line comparison, FC displays the name of the
primary file, the line or lines that differ, and the next
line that matches. FC generates a similar display for the
secondary file. For a binary comparison, FC displays the
offset (hex) within the file and the differing bytes.
FC may be unreliable just after a file is copied, if you are
using a disk cache. The file may be read from the cache
rather than the disk.
The FC options are:
^b/A^b
Abbreviate display of ASCII files.
^b/B^b
Binary comparison (byte-by-byte).
^b/C^b
Ignore Case for alphabetic characters.
^b/L^b
Line-by-line comparison of files.
^b/LB n^b Line buffer: Abort if files have more than n
consecutive differing lines. Default is 100 lines.
^b/N^b
Number lines.
^b/T^b
Do not expand Tabs. (If omitted, tabs are
expanded to 8-character boundaries.)
^b/W^b
White Space: Runs of spaces, tabs, and blank
lines are compressed to a single space.
^b/nn^b
Number of lines that must match after a line
difference to resynchronize. Default is 3.
All switches must precede the filenames.
The /B (binary) switch cannot be used with any other
switches.
See also ^rCOMP^r and ^rDISKCOMP^r.
^bEXAMPLES^b
To compare two text files, ignoring case, with line
numbers displayed:
fc /c /n letter.new letter.txt
To compare two binary files:
fc command.com c:\dos\command.com
To perform a binary comparison of two text files:
fc /b letter.new letter.txt
^bSYNTAX
(External DOS)^b
FDISK
^bPURPOSE^b
Configure a hard disk and manage partitions.
^bCOMMENTS^b
A hard disk is logically divided into separate areas called
partitions. DOS keeps this information in the ^upartition^u
^utable^u, stored in a special area of the disk.
FDISK is a menu driven program used to display a summary of
partition data, create partitions, delete partitions, or
change the active partition if you have more than one
operating system installed.
If you don't use the DOS installation program, you must run
FDISK before you can FORMAT a hard disk for the first time.
However, if your computer is already up and running, you
probably do not need to use FDISK.
^bCAUTION:^b FDISK can be a dangerous command. If you delete
a partition, all the data it contains is gone. (You can
try to recover with the Norton Utilities.)
A hard disk is often configured as a single drive, the ^uprimary^u
^uDOS partition^u, and designated the active partition or boot
drive (C:). The maximum size is two gigabytes.
With larger drives or multiple hard disks, one or more
additional DOS partitions can be established, called ^uextended^u
^uDOS partitions^u. For example, you might partition a 120Meg hard
disk into two 60Meg drives (C: and D:). Extended DOS
partitions can be further subdivided into multiple logical
drives, up to the letter Z.
If you run different operating systems in separate partitions
(for example, MS-DOS and Unix), only one partition can be
designated as the active partition at a particular time. In
this case, use FDISK to change the active partition when you
want to switch operating systems. Boot from a floppy disk
with MS-DOS to use FDISK when a non-DOS partition is active.
Note that data cannot be shared across the non-DOS partitions.
See your DOS manual for more information on FDISK.
See also ^rFORMAT^r.
^bSYNTAX
(External DOS)^b
FIND [/V][/C][/N][/I] "string" [drive:][path]filename
^bPURPOSE^b
Searches files for a specified string.
^bCOMMENTS^b
You cannot use wildcard characters in the filenames.
FIND is case sensitive (uppercase characters do not match
lowercase characters) unless the /I switch is specified.
The FIND options are:
^b/V^b Display all lines NOT containing the string.
^b/C^b Display the number of lines containing the string.
^b/N^b Display the line number of each matching line.
^b/I^b Ignore case differences.
See also ^rFILEFIND^r and ^rTS^r.
^bEXAMPLE^b
Search for the string "NDOS" in the file NDOS.DOC, and display
the line numbers it appears on:
c:\> find /n "NDOS" ndos.doc
^bSYNTAX
(External DOS)^b
FORMAT drive: [/Q] [/U] [/B|/S] [/F:size] [/V[:label]
FORMAT drive: [/Q] [/U] [/1] [/4] [/8] [/B|/S]
[/N:sn] [/T:tn] [/V[:label]
^bPURPOSE^b
Format (initialize) a disk.
^bCOMMENTS^b
FORMAT analyzes a disk for any defective tracks and prepares
the disk for DOS files. It initializes the directory and sets
up the file allocation table (FAT) and the system loader.
^uCAUTION^u: The FORMAT command can destroy all files on the
target disk.
The FORMAT options are:
^b/1^b Format a diskette for single-sided use.
^b/4^b Format a double-density 5 1/4" diskette in a high-
capacity drive.
^b/8^b Format a diskette for 8 sectors per track rather than
the default 9 sectors in a double-density drive, or
15 in a high capacity drive.
^b/B^b Leave space on the disk for the system files
(IBMBIO.COM and IBMDOS.COM) so that they can be added
later with the SYS command. However, this is no longer
necessary with DOS 5.0; the switch is maintained for
compatibility with earlier versions of DOS.
^b/F:size^b Specify a size different than the default size
of the drive. Valid sizes are 160, 180, 320, 360,
720, 1200, 1440, or 2880 kilobytes.
^b/N:sn^b Specifies the number of sectors per track on the
formatted disk. For example, use /N:9 to format a
720KB disk in a 3.5" 1.44 MB drive.
^b/Q^b Quick format deletes File Allocation Table and
root directory of an already formatted disk, but does
not check the disk for bad sectors.
^b/S^b Copy the hidden operating system files and the command
processor to the new disk.
^b/T:tn^b Specifies the number of tracks per disk side on the
formatted disk. For example, use /T:80 to format a
720KB disk in a 3.5" 1.44 MB drive.
^b/U^b Unconditional format of a disk; all data is destroyed
and cannot be recovered with UNFORMAT.
^b/V[:label]^b Specify an 11-character disk volume label.
If just /V is specified, you are prompted for the
label.
^bNDOS note:^b In DOS 3.3 and earlier versions, FORMAT /S
will copy COMMAND.COM as the command processor. In DOS 4.0,
FORMAT /S will copy the program specified by the COMSPEC
environment variable, but name it COMMAND.COM on the target
disk. As a result when the COMSPEC is set to NDOS, FORMAT /S
will copy NDOS.COM to the target disk and name it
COMMAND.COM. This will render the disk not bootable; to make
it bootable, copy COMMAND.COM manually, or copy the NDOS.OVL
file to the disk.
See also ^rDISKCOPY^r, ^rSFORMAT^r, and ^rUNFORMAT^r.
^bEXAMPLES^b
Create a boot disk in drive A:
c:\> format a: /s
Format a 3 1/2" double density disk in high capacity drive B:
and prompt for a volume label:
c:\> format b: /n:9 /t:80 /v
^bSYNTAX
(External DOS)^b
GRAFTABL [
GRAFTABL /STATUS
^bPURPOSE^b
Load a character table to allow CGA monitors to display ASCII
values above 127.
^bCOMMENTS^b
Use GRAFTABL to display foreign language and line-drawing
characters while in graphics mode on a CGA (color graphics
adapter) display.
The GRAFTABL options are:
Country code page:
U.S./English (default)
Multilingual
Slavic
Portuguese
French
Nordic
^b/STA^b Display the current GRAFTABL status.
GRAFTABL is memory resident (about 1K of RAM).
^bSYNTAX
(External DOS)^b
GRAPHICS [printer] [profile] [/R] [/B] [/LCD] [/PRINTBOX:rat]
^bPURPOSE^b
Enables graphics printing, allowing a compatible printer to
print a screen image displayed on a graphics monitor using
Shift-PrtSc (print-screen).
^bCOMMENTS^b
The GRAPHICS parameters are:
^bprinter^b One of the following printer types:
COLOR1
IBM PC Color printer with
black ribbon
COLOR4
IBM PC Color printer with RGB
ribbon
COLOR8
IBM PC Color printer with CMY
ribbon
HPDEFAULT
HP PCL printer
DESKJET
HP DeskJet
GRAPHICS
IBM PC Graphics Printer,
Proprinter, or Quietwriter (default)
GRAPHICSWIDE IBM PC Graphics Printer with
11-inch carriage
LASERJET
HP LaserJet
LASERJETII
HP LaserJet II
PAINTJET
HP PaintJet
QUIETJET
HP QuietJet
QUIETJETPLUS HP QuietJet Plus
RUGGEDWRITER HP Ruggedwriter
RUGGEDWRITERWIDE HP Ruggedwriterwide
THERMAL
IBM PC convertible printer
THINKJET
HP ThinkJet
^bprofile^b The printer definition file. If omitted, DOS
looks for GRAPHICS.PRO in the current directory
and the directory where GRAPHICS.COM resides.
^b/B^b
Prints background in color for COLOR4 and COLOR8
printers (default is not to print background).
^b/R^b
Reverses the printed image to print black and
white as they appear on the display. The default
is to print a white-on-black screen as black-on-
white.
^b/LCD^b
Prints the image as it appears on the IBM PC
Convertible LCD screen (same as /PRINTBOX:LCD).
^b/PRINTBOX:rat^b Specify the aspect ratio of the print;
rat can be STD (standard) or LCD. PRINTBOX can
be abbreviated to PB.
GRAPHICS is memory-resident, and uses about 6K of RAM.
^bEXAMPLES^b
Enable graphics printing on a graphics printer; background
color will not be printed and the foreground image will print
in black:
c:\> graphics
Enable graphics printing on a COLOR4 ribbon printer; black
and white images will be displayed as they appear on the screen:
c:\> graphics color4 /r
^bSYNTAX
(External DOS)^b
JOIN drive: drive:\path
JOIN drive: [/D]
^bPURPOSE^b
Connect a drive to a directory on another drive.
^bCOMMENTS^b
The specified path must be an empty directory which is only
one level deep from the root. It cannot be the current
directory. If the named directory doesn't exist, DOS creates
it automatically.
The only JOIN option is:
^b/D^b Disconnect a join.
Once a drive is JOINed it no longer exists to the system and
"invalid drive specification" will be indicated if you
attempt to refer to the drive. The JOIN must be disconnected
before the drive can be used again.
Entering JOIN with no parameters will produce a list of the
drives and directories that are JOINed.
When a JOIN is in effect the entire directory structure of the
source drive appears within the destination subdirectory.
Files in the root directory of the source drive appear in the
destination subdirectory itself; lower-level directories on
the source drive appear as corresponding lower-level
directories below the destination subdirectory. This is the
inverse of SUBST.
Do not JOIN a drive that has been ASSIGNed or SUBSTituted. Do
not use BACKUP, DISKCOMP, DISKCOPY, FORMAT or RESTORE when
JOIN is in effect.
See also ^rASSIGN^r and ^rSUBST^r.
^bEXAMPLES^b
Join everything in drive A so that it appears in the C:\ADISK
directory:
c:\> join a: c:\adisk
Undo the join:
c:\> join a: /d
^bSYNTAX
(External DOS)^b
KEYB [xx[,[
y],[pathname
] [/E] [/ID:
^bPURPOSE^b
Replaces the keyboard program contained in ROM BIOS to support
keyboards which do not have the default U.S. English layout.
^bCOMMENTS^b
If there are no parameters, KEYB displays its current status.
KEYB supports two hot-keys: Ctrl-Alt-F1 switches back to the
U.S. keyboard, while Ctlr-Alt-F2 returns to the specified
country keyboard.
The KEYB parameters are:
^bxx^b
The keyboard code, such as UK.
The code page number. If this is omitted, the
default code page for the country is assumed.
^bpathname^b The filename of the keyboard definition file.
If omitted, KEYB attempts to load KEYBOARD.SYS
from the root directory of the current drive.
^b/E^b
Specifies an enhanced keyboard with an 8086
computer.
^b/ID^b
Specify the keyboard ID for countries that
support more than one keyboard layout (France,
Italy, and the U.K.).
KEYB is memory-resident, and uses about 6K of RAM.
See your DOS documentation for more information on KEYB.
^bEXAMPLES^b
Set the computer to use the UK keyboard:
c:\> keyb uk,437,c:\dos33\keyboard.sys
Display the current KEYB status:
c:\> keyb
^bSYNTAX
(External DOS)^b
LABEL [drive:][label]
^bPURPOSE^b
Create, change, or delete a volume label.
^bCOMMENTS^b
A volume label can contain up to 11 characters. Do not use
the DOS wildcard characters (* and ?) or any character from
the following list:
" + ; ' = [ , ] \ . | < >
DOS will convert lowercase letters to uppercase.
If the drive is omitted, DOS will assume the default drive.
If the volume label is omitted, LABEL will prompt for it. If
a blank label is entered in response to the prompt, the disk
label is deleted.
See also ^rFORMAT^r, ^rSFORMAT^r, and ^rVOL^r.
^bEXAMPLE^b
Label the disk in drive A as BACKUP_66:
c:\> label a:backup_66
^bSYNTAX
(External DOS)^b
MEM [/PROGRAM|/DEBUG|/CLASSIFY]
^bPURPOSE^b
Display the amount of used and free memory, list programs
loaded, report allocated and free memory areas.
^bCOMMENTS^b
MEM without any parameters displays the total and free
conventional memory; and, if available, extended and expanded
memory as well.
The /CLASSIFY switch will be particularly useful when
optimizing your system configuration to find out the size and
memory type where device drivers and memory-resident programs
are loaded.
The /PROGRAM report includes memory addresses (hex) where
programs are loaded. The /DEBUG report includes internal
drivers and other programming information, as well.
The extended memory is report is displayed only if more than
1Meg of memory is available. The expanded memory report is
displayed only if an expanded memory driver is installed.
Only one switch can be specified.
The MEM options are:
^b/PROGRAM^b Display the address and size of programs
currently loaded in memory. Only ^b/P^b is required.
^b/DEBUG^b
Display programs, internal drivers, and other
programming information. Only ^b/D^b is required.
^b/CLASSIFY^b List programs loaded in both conventional and
upper memory (in decimal and hex notation). Only
^b/C^b is required.
See your DOS manual for more information on MEM.
See also ^rMEMORY^r and ^rSYSINFO^r.
^bEXAMPLES^b
Display memory status:
Print memory usage by class (redirecting the output of MEM to
the printer):
mem /c > prn:
Display memory map one screen at a time (piped into the MORE
filter):
mem /d | more
^bSYNTAX
(External DOS)^b
MIRROR [drive:]
. [/1] [/Tdrive[-entries]
MIRROR [/U]
MIRROR [/PARTN]
^bPURPOSE^b
Save information about a disk to restore deleted files or
recover from an accidental format of a hard disk.
^bCOMMENTS^b
The MIRROR command creates a series of files to help recover
from disk misadventures.
MIRROR with no parameters creates a hidden file in the root
called MIRROR.FIL that contains a copy of the root directory
and file allocation table for the default drive. More than one
drive can also be specified on the command line.
The /T switch loads a memory-resident program that maintains
another hidden file called PCTRACKR.DEL, tracking deleted
files and their directory locations. With /PARTN, MIRROR
creates a file on a floppy disk called PARTNSAV.FIL,
containing information about the hard disk's partition table.
The MIRROR options are:
drive:
Drive for which MIRROR is to save
information. More than one can be specified.
Don't make a backup of the mirror file.
/Tdrive
Loads a TSR deletion-tracking program to save
information for the UNDELETE command. The drive
must be specified.
-entries
An optional parameter with /Tdrive to specify
the number of entries in the deletion-tracking
file (from 1 to
9). The default varies with
the size of the disk.
Unload the TSR deletion-tracking program from
memory.
/PARTN
Save information about a hard disk's partition
table on a floppy disk for use with the DOS
UNFORMAT command.
See your DOS manual for more information on MIRROR.
See also ^rUNERASE^r and ^rUNFORMAT^r.
^bEXAMPLES^b
Save a copy of the file allocation table for drive C, and load
deletion-tracking for drives A and C:
mirror c: /ta /tc
Track deletions for 500 files on drive D:
mirror td-500
^bSYNTAX
(External DOS)^b
See below for syntax to:
^b^C07^b set the printer parameters
^b^C07^b set the video display parameters
^b^C07^b set the serial port parameters
^b^C07^b redirect parallel port output to a serial port
^b^C07^b prepare one or more code pages
^b^C07^b select a code page
^b^C07^b display the active code page
^b^C07^b refresh a code page
^b^C07^b display status of a device
^b^C07^b set the keyboard repeat rate
^bPURPOSE^b
Setup a printer, video display, serial port, or code page
switching.
^bCOMMENTS^b
MODE is memory-resident, and uses about 1K of RAM.
See the DOS manual for more information on code pages. Also
see ^rCHCP^r and ^rNLSFUNC^r.
^bTo set the printer parameters:^b
MODE LPT#[:][c][,[l][,r]]
MODE LPT#[:][COLS=c][,[LINES=l][,RETRY=r]]
^b#^b 1, 2, or 3 (the printer number).
^bc^b 80 or 132 characters per line.
^bl^b 6 or 8 lines per inch.
^br^b Action to take on a time-out error. One of the
following:
e return an error
b return "busy"
p continue retrying
r return "ready"
n no retry (default)
^bTo set the video display parameters:^b
MODE [display][,shift[,T]]
MODE [display][,n]
MODE CON: [COLS=c] [LINES=n]
^bdisplay^b 40, 80, BW40, BW80, CO40, CO80, or MONO.
^bshift^b
R or L (shift the CGA display right or left).
^bT^b
Display an alignment test pattern.
^bn^b
Specify number of lines (25, 43, or 50). Your
display adapter must support the lines specified
and the ANSI.SYS device driver must be installed.
^bCOLS=c^b
Specify the number of columns (40 or 80).
^bLINES=n^b Specify number of lines (25, 43, or 50). Your
display adapter must support the lines specified
and the ANSI.SYS device driver must be intalled.
^bTo set the serial port parameters:^b
MODE COMn:baud[,parity[,databits[,stopbits[,retry
MODE COMn: BAUD=baud [PARITY=parity] [DATA=databits]
[STOP=stopbits] [RETRY=retry]
^bn^b
1, 2, 3 or 4 (serial port number)
^bbaud^b
110, 150, 300, 600, 1200, 2400, 4800, 9600
or 19200 (use the first two digits).
^bparity^b
N (none), O (odd), or E (even); the default
is E. Some computers support M (mark) and
S (space).
^bdatabits^b 7 or 8; the default is 7. Some computers
also support 5 and 6.
^bstopbits^b 1 or 2; the default is 2 for 110 baud, and 1
for all other baud rates. Some computers
support 1.5 as well.
^bretry^b
Action to take on a time-out error. One
of the following:
e return an error
b return "busy"
p continue retrying
r return "ready"
n no retry (default)
^bTo redirect parallel port output to a serial port:^b
MODE LPT#:=COMn
^b#^b 1, 2, or 3 (parallel port or printer number).
^bn^b 1, 2, 3, or 4 (serial port number).
Before parallel port output can be redirected, the serial port
must be initialized (see the previous option to set serial
port parameters).
^bTo prepare one or more code pages:^b
MODE device CODEPAGE PREPARE=((cplist) [drive:][path]filename)
^bdevice^b
CON, PRN, LPT1, LPT2 or LPT3
^b(cplist)^b Code page list: one or more code page numbers.
The valid code page numbers are 437, 850, 852,
860, 863 and 865.
^bfilename^b Specifies the file containing the code
page(s). On an IBM PC these are:
4201.CPI IBM Proprinter (II,
I, and XL)
4208.CPI IBM Proprinter (X24E and XL24E)
5202.CPI IBM Quietwriter
I Printer
EGA.CPI
EGA type devices
LCD.CPI
IBM Convertible LCD display
CODEPAGE PREPARE can be abbreviated CP PREP. In the code
page list, unchanged pages are surrounded by commas. For
example in the list (850,,863), the second code page remains
as it was set in the previous CODEPAGE PREPARE command for
the device.
^bTo select a code page:^b
MODE device CODEPAGE SELECT=cp
^bdevice^b CON, PRN, LPT1, LPT2 or LPT3
^bcp^b
Code page number to be activated. The valid
code pages are 437, 850, 852, 860, 863 and 865.
CODEPAGE SELECT can be abbreviated CP SEL. The value of cp
must be one of the code pages previously activated for the
specified device with the CODEPAGE PREPARE option.
^bTo display the active code page:^b
MODE device CODEPAGE [/STATUS]
^bdevice^b
CON, PRN, LPT1, LPT2 or LPT3
^b/STATUS^b Optional and has no effect.
This command displays the active code page and a list of
selectable code pages for the specified device.
^bTo refresh a code page:^b
MODE device CODEPAGE REFRESH
This command refreshes the code page on the specified device
if it has been lost (for example, by turning off the printer).
CODEPAGE REFRESH can be abbreviated CP REF.
^bTo display the status of a device:^b
MODE [device] [/STATUS]
^b/STATUS^b Displays the status of redirected parallel
printers.
To display the status of all devices, use MODE by itself.
^bTo set the typematic rate:^b
MODE CON: [RATE=r DELAY=d]
^bRATE=r^b
Rate at which a character is repeated when
a key is held down, from 1 to 32 (roughly
2 to 30 characters per second). Default is
20 for AT compatible keyboards and 21 for
the PS/2.
^bDELAY=d^b
Delay before repeat begins when a key is
held down. Valid values are 1, 2, 3, or 4
(.25, .50, .75, and 1 second). Default is 2.
The rate and delay must both be set.
^bSYNTAX
(External DOS)^b
MORE < pathname
command | MORE
^bPURPOSE^b
Display a screen-full of data, then pause.
^bCOMMENTS^b
Pressing any key sends another screen of data to the standard
output device. This continues until all input data has been
read.
You can usually use LIST, or TYPE with the /P option, rather
than MORE.
See also ^rLIST^r and ^rTYPE^r.
^bSYNTAX
(External DOS)^b
NLSFUNC [pathname]
^bPURPOSE^b
Supports extended country information, and allows for the
display and printing of national symbol sets.
^bCOMMENTS^b
NLSFUNC must be loaded prior to using CHCP.
The pathname specifies the name and location of the country
information file. If this parameter is omitted, the command
will use the path and filename specified in the COUNTRY=
statement in the CONFIG.SYS file.
See your DOS manual for more information on code page
switching.
See also ^rCHCP^r and ^rMODE^r.
^bEXAMPLE^b
Set the system for code page switching using COUNTRY.SYS in
the C:\DOS33 directory:
c:\> nlsfunc c:\dos33\country.sys
^bSYNTAX
(External DOS)^b
PRINT [/D:device][/B:bufsiz][/U:busytick][/M:maxtick]
[/S:timeslice][/Q:quesiz][/T][/C][/P]
[[drive:][path][filename][.ext]
^bPURPOSE^b
Queue and print data files.
^bCOMMENTS^b
Since PRINT is memory-resident, the /D, /B, /U, /M, /S and /Q
options can only be specified the first time it is invoked.
PRINT requires about 5.5K of RAM, plus the amount of buffer
space requested with the /B option.
The PRINT options are:
^b/D^b Specify the print device; the default is PRN.
^b/B^b Set the size of the internal buffer; the default is
512.
^b/Q^b Specify the maximum number of files in the print queue
(1 to 32; the default is 10).
^b/S^b Specify the time-slice value (1 to 255; the default is
^b/U^b Specify the number of clock ticks to wait for the
printer; the default is 1.
^b/M^b Specify how many clock ticks PRINT can have (1 to 255;
the default is 2).
^b/T^b Stop printing and delete all files from the queue.
^b/C^b Deletes the preceding filename from the print queue,
and all following filenames until the end of the line
or a /P.
^b/P^b Adds the preceding filename to the print queue, and
all following filenames until the end of the line or
a /C.
^bfilename^b File(s) to be added (the default) and/or cleared
from the print queue (see the /C and /P options). The
wildcard characters * and ? are allowed in file names.
^bEXAMPLE^b
Set the print device to LPT2, set the buffer to 4K, and the
maximum queue size to 10:
c:\> print /D:lpt2 /B:4096 /Q:10
^bSYNTAX
(External DOS)^b
QBASIC [/B] [/EDITOR] [/G] [/H] [/MBF] [/NOHI]
[[/RUN] [drive:][path]filename]
^bPURPOSE^b
Develop programs written in the BASIC programming language.
^bCOMMENTS^b
QBASIC is a complete development environment to write, edit,
and run programs written in BASIC. It is a major improvement
over BASIC, BASICA, or GW-BASIC, and includes extensive
online help (press function key F1).
QBASIC is a structured language and, unlike earlier
versions of BASIC, line numbers are optional.
After loading QBASIC, press the Alt key and then Enter to
access the menus on the top line of the screen. Alternatively,
press Alt and the first letter of the menu name.
The QBASIC options are:
^b/B^b
Black and white on a color display.
^b/EDITOR^b Load the QBASIC program editor.
^b/G^b
Faster updates for CGA displays (don't use
this option if you see "snow").
^b/H^b
Run QBASIC with the maximum number of lines
available on the screen.
^b/MBF^b
Convert the QBASIC functions CVS, CVD, MKS$,
and MKD$ to use the Microsoft Binary Format
for numbers rather than I
E format.
^b/NOHI^b
Allows use of a monitor that does not support
high-intensity video.
^b/RUN^b
Run the specified program (a filename is
required).
See your DOS manual for more information on QBASIC.
^bEXAMPLE^b
Run the sample program GORILLA.BAS:
qbasic /run c:\dos\gorilla
^bSYNTAX
(External DOS)^b
RECOVER [drive:][[path]filename]
RECOVER drive:
^bPURPOSE^b
Recover a single file that contains a bad sector (if its
directory entry is intact), or recover all of the files on a
disk with a damaged directory.
^bCOMMENTS^b
^uWARNING:^u This is an extremely ^bdangerous command^b. If you
specify recovery of an entire disk, either explicitly or by
failing to specify a file name, RECOVER will attempt to
recover the entire disk without further prompting! In this
case all directory structures, file names, and other
distinguishing information on the disk will be lost. All
files, including those with no bad sectors, will be converted
into root-directory files with names like FILE
01.REC.
^bNeed more be said department:^b Use the Norton Utilities
instead whenever you have to recover from file or disk
problems. Delete the RECOVER program which comes with DOS
from your disk.
The RECOVER parameters are:
^bdrive:^b The drive designator for the drive that contains
the single file or the entire drive that is to be
recovered (default is the current drive).
^bpath^b
The path containing the single file to be
recovered (default is the current directory of the
specified drive).
^bfilename^b The name of the file to be recovered (default is
to recover the entire disk).
^bEXAMPLES^b
Recover only the file named MEMO.ONE in the \REPORT directory
on drive C:. If this file has no bad sectors, it will remain
unchanged.
c:\> recover c:\report\memo.one
Recover the entire disk in drive A:. All files on the disk in
drive A: will be placed in the root directory and renamed
n.REC.
c:\> recover a:
^bSYNTAX
(External DOS)^b
REPLACE [drive:][path]filename [drive:][path]
[/A] [/P] [/R] [/S] [/U] [/W]
^bPURPOSE^b
Selectively replaces files in one directory from those in
another directory.
^bCOMMENTS^b
REPLACE copies the specified ^usource^u files to the
^udestination^u directory. If the files already exist in the
destination directory, they are overwritten (unless /A is
specified). The default target is the current directory.
The /S switch can be used to replace all copies of a file
anywhere on a disk with a newer copy.
REPLACE cannot copy or update hidden or system files.
The REPLACE parameters are:
^b/A^b Add files to the destination directory that are not
already in it, but do not replace files that already
exist. Cannot be used with /S or /U.
^b/P^b Prompt before replacing or adding files.
^b/R^b Replace read-only files. If /R is not specified,
REPLACE stops at the first read-only source file it
finds.
^b/S^b Search all subdirectories of the target directory to
find matches for source files. Cannot be used with /A.
^b/U^b Update: Replace those files on destination that are
older than the source. Cannot be used with /A.
^b/W^b Wait: Prompt for a key-press before starting to
replace files, allowing you to insert a source
diskette on a floppy-only system.
^bEXAMPLES^b
Replace files named PHONES.* in the \CLIENTS directory on
drive C: with files with the same name in the root directory
of drive A:. You will be prompted before each replacement:
c:\> replace a:\phones.* c:\clients /p
Copy all files from the root directory of drive A: to
directory C:\UTILS, except those which already exist in
C:\UTILS:
c:\> replace a:\*.* c:\utils /a
^bSYNTAX
(External DOS)^b
RESTORE drive: [drive:][path][filename] [/S] [/P]
[/B:date] [/A:date] [/N] [/M] [/L:time] [/E:time] [/D]
^bPURPOSE^b
Restore backup files to disk.
^bCOMMENTS^b
The first argument is the ^usource^u drive; the second is the
^utarget^u disk or file specification.
If no target is specified RESTORE will use the current drive.
^bFiles must be restored to the same directory^b they were in
when the backup was created with BACKUP. The wildcard
characters * and ? are allowed in the filename.
The RESTORE options are:
^b/S^b Restore all subdirectory files in addition to the
specified directory.
^b/P^b Prompt before overwriting files that have changed
since the last backup, or that are marked read-only.
^b/B:date^b Restore files modified on or before the date
specified (the date format depends on the current
country setting).
^b/A:date^b Restore files modified on or after the date
specified (the date format depends on the current
country setting).
^b/M^b Restore files that have been modified or deleted since
the most recent backup.
^b/N^b Restore files that no longer exist on the target.
^b/L:time^b Restore only files modified at or after the time
specified. The time is in hh:mm:ss format.
^b/E:time^b Restore only files modified at or before the time
specified. The time is in hh:mm:ss format.
^b/D^b Display the list of files that match "filename"
without restoring any files. You must specify the
target drive with the /D switch even though no files
will be restored.
RESTORE may not work properly if an ASSIGN, JOIN or SUBST was
in effect at the time the files were backed up, or if APPEND
is in effect when RESTORE is run.
RESTORE will not restore existing system files.
See also ^rBACKUP^r.
^bEXAMPLE^b
Restore the fixed disk C from the backup disks in A:
c:\> restore a: c: /s
Restore the file \WP\MEMO.DOC from the backup disk in A:
c:\> restore a: c:\wp\memo.doc
^bSYNTAX
(External DOS)^b
SETVER [drive:path] [filename n.nn]
SETVER [drive:path] [filename [/DELETE] [/QUIET]]
^bPURPOSE^b
Set the DOS version number reported to a program.
^bCOMMENTS^b
Some programs query DOS to report the version number and
require a specific DOS version before proceeding. SETVER
maintains an internal version table that allows you to
control what version number is reported to the program.
Before using SETVER, it must be loaded as a device driver
from your CONFIG.SYS file.
SETVER with no parameters (or just drive:path) lists the
programs and version numbers stored in the version table.
The ^bdrive:path^b parameter is the location of the SETVER.EXE
file, but need only be specified if SETVER is not available
on the search PATH.
^bfilename^b is the name of the program to add to the version
table. ^bn.nn^b is the major and minor DOS version number
from 2.0 to 9.99 (for forward thinkers) that DOS will report
to the program.
The SETVER options are:
^b/DELETE^b Remove the specified program from the version
table. Only ^b/D^b is required.
^b/QUIET^b
Suppress screen messages normally displayed
during deletion of the entry.
You must reboot before changes to the SETVER version table
take effect.
See your DOS manual for more information on SETVER.
^bEXAMPLE^b
To add a program to the version table that tests for DOS
version 2.11:
setver test211.com 2.11
^bSYNTAX
(External DOS)^b
SHARE [/F:filespace][/L:locks]
^bPURPOSE^b
Load support for file sharing and file locking.
^bCOMMENTS^b
SHARE is for network users. To load SHARE automatically under
DOS 4.0 and above, put SHARE.EXE in the root directory of
your boot disk, or the directory pointed to by your SHELL=
command in CONFIG.SYS.
You can load SHARE manually from the AUTOEXEC.BAT file, but it
sometimes works better if loaded automatically.
^bNote: SHARE controls the use and sharing of data and disk
files between programs. SHARE should be loaded if you are
using a DOS version earlier than 5.0 and your hard disk has
a partition larger than 32 Megabytes.
The SHARE options are:
^b/F:filespace^b Allocate file space for the file sharing
information area. Each open file requires
the length of the full filename plus 11
bytes. The default is 2048 bytes.
^b/L:locks^b
Allocate space for the number of locks.
The default is 20 locks.
SHARE is memory-resident, and uses about 6K of RAM (DOS 3.3).
^bEXAMPLE^b
Allocate 4096 bytes for file space and 40 locks:
c:\> share /F:4096 /L:40
^bSYNTAX
(External DOS)^b
SORT [/R][/+n] < pathname
command | SORT [/R][/+n]
^bPURPOSE^b
Read data from standard input, sort it, and write it to
standard output.
^bCOMMENTS^b
SORT is a filter used to organize information. The largest
file you can sort is 63K. SORT ignores case differences.
The SORT options are:
^b/R^b
Sort in reverse order (Z to A).
^b/+n^b Start sorting with column n.
^bEXAMPLE^b
Sort the file ADDRESS and write it to SORTED:
c:\> sort < address > sorted
^bSYNTAX
(External DOS)^b
SUBST
SUBST drive: drive:\path
SUBST drive: /D
^bPURPOSE^b
Substitute a virtual drive for a path.
^bCOMMENTS^b
If you don't enter any arguments, SUBST will display the
current virtual drives.
SUBST is useful for applications that do not recognize paths;
it permits the use of a drive to represent a path. When a
SUBST is in effect the specified path appears as if it were
the root directory of the specified drive. Lower-level
subdirectories appear as lower-level subdirectories on the
new drive. This is the inverse of JOIN.
The only option for SUBST is:
^b/D^b Delete a substitution
The first and second drive specifiers must be different; the
first drive letter cannot be the current default drive; and
no reference can be made to a network drive. The drive
letter being substituted must be equal to or less than the
letter specified in the LASTDRIVE statement in the CONFIG.SYS
file (default E:).
CD, MD, and RD should be used with care when SUBST is in
effect. ASSIGN, BACKUP, DISKCOMP, DISKCOPY, FDISK, FORMAT,
JOIN, LABEL and RESTORE should not be used when SUBST is in
effect.
See also ^rASSIGN^r and ^rJOIN^r.
^bEXAMPLE^b
Create a virtual drive D to access C:\WP\MEMOS\JAN89:
c:\> subst d: c:\wp\memos\jan89
^bSYNTAX
(External DOS)^b
SYS [source-drive:] drive:
^bPURPOSE^b
Copy the two hidden operating system files and COMMAND.COM to
another drive.
^bCOMMENTS^b
If the source-drive (which contains the operating system
files) is not specified, DOS searches the root directory of
the default drive for the system files.
The disk drive to receive the operating system must contain
an already formatted disk.
See also ^rFORMAT^r.
^bEXAMPLE^b
Copy the system files to drive A:
c:\> sys a:
^bSYNTAX
(External DOS)^b
TREE [drive:][path] [/F] [/A]
^bPURPOSE^b
Display the directory and file structure.
^bCOMMENTS^b
Unless otherwise specified with drive and path, TREE begins
its display from the current directory of the default drive.
The options for TREE are:
^b/F^b Display the names all files in each directory.
^b/A^b Use text characters instead of graphic characters to
display the directory tree.
See also ^rDIR^r.
^bEXAMPLE^b
Display the names of the files in all directories on the
default drive:
c:\> tree \ /f
^bSYNTAX
(External DOS)^b
UNDELETE [[drive:][path]filename] [/LIST|/ALL] [/DOS|/DT]
^bPURPOSE^b
Recover files deleted with the DEL or ERASE commands.
^bCOMMENTS^b
UNDELETE will recover erased files based either on
information in the deletion-tracking file created with the
MIRROR command or information from the internal DOS directory
listing.
You are prompted to enter the first character of the filename
and confirm the recover operation.
If /ALL is specified, a # is used as the first character of
the filename (or another character that is unique, if
necessary).
UNDELETE cannot recover a directory or a file if the directory
that contained it has been removed.
^bNote:^b Use EP (Erase Protect) to guard against accidental
file deletions.
The UNDELETE options are:
^b/LIST^b
List files that can be recovered.
^b/ALL^b
Recover deleted files without prompting for
confirmation.
^b/DOS^b
Recover files marked as deleted by DOS
(ignore MIRROR information).
^b/DT^b
Recover only files listed in the "deletion-
tracking" file created by MIRROR.
See your DOS manual for more information on UNDELETE.
See also ^rEP^r and ^rUNERASE^r.
^bEXAMPLE^b
Recover all deleted files from the current directory with the
extension .TXT:
undelete *.txt
Recover all deleted files from the current directory with the
extension .TXT without prompting for confirmation:
undelete *.txt /all
^bSYNTAX
(External DOS)^b
XCOPY [drive:][path]filename [drive:][path][filename]
[/A] [/D:date] [/E] [/M] [/P] [/S] [/V] [/W]
^bPURPOSE^b
Copy files and directories, including subdirectories.
^bCOMMENTS^b
The first argument is the ^usource^u file or directory you want to
copy. The second argument is the ^utarget^u. If you omit the
target, XCOPY uses the default directory with ^b*.*^b as the
default filename.
The XCOPY options are:
^b/A^b Archive: Copy source files that have the archive bit
set. This option does not modify the archive bit.
^b/D^b Date: Copy source files modified on or after the
specified date (the date format depends on the current
country setting).
^b/E^b Empty: Copy any subdirectories, even if empty. Using
this option without the /S option will cause an error.
^b/M^b Modify: Same as /A, but after copying a file, turn
off the archive bit in the source file.
^b/P^b Prompt with a "Y/N" before creating each target file.
^b/S^b Subdirectories: Copy subdirectories, unless they
are empty.
^b/V^b Verify each disk write. This is the same as executing
the VERIFY ON command, but is only active while XCOPY
is running.
^b/W^b Wait for a keystroke before copying files.
XCOPY may not work correctly if it is used while an APPEND /X
is in effect.
The NDOS description file created by DESCRIBE is NOT updated
by XCOPY.
See Also ^rBACKUP^r, ^rCOPY^r, and ^rMOVE^r.
^bEXAMPLES^b
Copy all of the files from drive D to drive C:
c:\> xcopy d:\ c:\ /s
Copy all of the files in the WP directory on drive C that were
modified on or after January 1, 1989 to drive A:
c:\> xcopy c:\wp a:\ /d:1-1-89
^bSYNTAX
(External Norton Utility)^b
CALIBRAT [drive:] [/BATCH] [/BLANK] [/NOCOPY] [/NOFORMAT]
^bPURPOSE^b
Optimize the speed and reliability of a hard disk.
^bCOMMENTS^b
Calibrate performs three main functions: a hard disk
"interleave" optimization to increase your disk's data
transfer rate (often by 66% or more); "firm up" any drift of
the read/write heads of a drive as it begins aging; verify
the surface of the disk with exhaustive testing.
The low-level format performed by Calibrate is both safe and
non-destructive -- no data is lost. You can even abort during
the procedure (press Esc).
Because Calibrate can actually change the low-level formatting
of your hard disk (including the hard disk interleave), you
should run the program in full-screen mode the first time you
use it.
The CALIBRAT options are:
^bdrive:^b
Drive letter of disk to optimize.
^b/BATCH^b
Skip prompts and exit to DOS when done.
^b/BLANK^b
Blank the screen during Pattern Testing.
^b/NOCOPY^b
Don't make a duplicate copy of the track
currently being tested.
^b/NOFORMAT^b
Perform pattern testing only, do not
low-level format disk.
^b/NOSEEK^b
Skip seek tests. (These need to be run
only the first time you use Calibrate.)
^b/PATTERN:n^b
Perform pattern testing at level ^bn^b (0, 5,
40, or 80).
^b/R[A]:pathname^b Send (or Append) report of results to
a file.
^b/X:drives^b
Exclude drives from testing (for
example, /X:def).
For best results:
* Don't have any disk caching software active when you
run Calibrate.
* Don't pop up TSR programs while Calibrate is running.
* Run the Norton Disk Doctor before running Calibrate to
verify the integrity of your file structure and make
sure bad parts of your drive are marked as bad.
* If your computer has a "turbo speed" control, it should
be set at the speed at which you will normally use your
computer.
See also ^rNDD^r.
^bEXAMPLE^b
Run Calibrate from a batch file for a periodic maintenance
check:
calibrat /noseek /noformat /pattern:0 /blank /batch
^bSYNTAX
(External Norton Utility)^b
DE [drive:][path][filename] [/M] [/X:drives] [/W] [/SKIPHIGH]
^bPURPOSE^b
View and edit files and disk system areas.
^bCOMMENTS^b
DE is the "short name" for DISKEDIT.
See ^rDISKEDIT^r for details.
^bSYNTAX
(External Norton Utility)^b
DISKEDIT [drive:][path][filename] [/M] [/X:drives] [/W]
[/SKIPHIGH]
^bPURPOSE^b
View and edit files and disk system areas.
^bCOMMENTS^b
DiskEdit is an extremely flexible disk utility, designed for
manual data recovery, system sleuthing, and digging into
places where you aren't normally allowed. DiskEdit is also a
powerful debugging aid for problems related to disk file
layouts.
Specify a complete pathname in the DiskEdit command line to
automatically select a drive and directory as the defaults
and select the file itself as the current object. If you use a
directory name (with no file name), that directory comes up
in the Directory Viewer.
For safety, DiskEdit comes in read-only mode. Enable disk
writing with the cOnfiguration option of the Tools menu or
use the ^b/W^b switch on the command line.
The DISKEDIT options are:
^b/M^b
Maintenance mode: bypasses DOS and looks
directly at the disk.
^b/X:drives^b Exclude drives from absolute sector processing
(for example, /X:def).
^b/W^b
Write-able mode (read-only off).
^b/SKIPHIGH^b Skip using high memory.
The ^b/M^b is needed when some critical DOS part of the disk
is missing. It causes DiskEdit to bypass the directory scan,
FAT analysis, and similar tasks. With /M, DiskEdit will also
attempt to access the diagnostic cylinder of any physical
hard disk, and if one is present, DiskEdit will allow you to
access that cylinder.
The "Trouble Shooter" chapter of the Disk Explorer manual
explains advanced usages of DiskEdit for cases where NDD,
UnErase, or UnFormat could not recover your data.
^bNote:^b DISKEDIT can be renamed to DE as a
configuration option of the Norton Utilities.
See also ^rNDD^r, ^rCALIBRAT^r, and ^rDISKTOOL^r.
^bEXAMPLE^b
View a file with DiskEdit:
diskedit c:\autoexec.bat
With the Quick Links option (ON by default, see the
cOnfiguration option of the Tools menu), press Enter
again to view the file's directory entry.
^bSYNTAX
(External Norton Utility)^b
DISKMON [/LIGHT+|-] [/PROTECT+|-] [/SKIPHIGH]
DISKMON [/PARK]
DISKMON [/STATUS]
DISKMON [/UNINSTALL]
^bPURPOSE^b
Enable or disable disk protection features: Disk Protect,
Disk Light, and Disk Park.
^bCOMMENTS^b
Disk Protect installs a TSR (RAM-resident program) which
tracks all attempts to write to any disks. When Disk Protect
is ON, you are warned whenever the disk is about to be
modified
and you can choose to block the attempted write
or let it continue. This provides safety from viruses and can
help avoid accidental deletion or overwriting of specific
types of files.
^bNote:^b When using Disk Protect with an application
running in graphics mode, for example Windows, you should
disable Disk Protect. Disk Protect will not be able to
pop up a confirming dialog box and will automatically
reject the write operation.
Disk Light also installs a TSR which displays a tiny flashing
light in the top right corner of your screen whenever any
disk is read or written. This is handy for monitoring RAM-
disk activities or to give you an indication of disk activity
if your system unit is on the floor and out of sight.
Disk Park moves the read/write heads of all your drives into
a safe location. This is especially important when you intend
to move your system unit, particularly on older drives that
do not have self-parking heads.
The DISKMON options are:
^b/LIGHT+|-^b
Turn the Disk Light on or off.
^b/PROTECT+|-^b Turn the Disk Protect features on or off.
^b/SKIPHIGH^b
Do not load into high memory.
^b/PARK^b
Park the disk heads on all drives.
^b/STATUS^b
Show the on/off status of Disk Protect and
Disk Light.
^b/UNINSTALL^b
Remove Disk Monitor from memory.
Disk Monitor can be configured to offer several different
levels of disk protection (files, system area, and entire
disk). You must use the full-screen mode to set or store this
configuration. The defaults stored in the DISKMON.INI file.
^bEXAMPLES^b
To park the heads of all drives:
diskmon /park
To enable the Disk Light:
diskmon /light+
^bSYNTAX
(External Norton Utility)^b
DISKREET [/ON|/OFF|/CLOSE]
DISKREET /SHOW[:drive]|/HIDE[:drive]
DISKREET /ENCRYPT:pathname [/PASSWORD:string]
DISKREET /DECRYPT:pathname [/PASSWORD:string]
^bPURPOSE^b
Encrypt and decrypt individual files or use encrypted areas
(NDisks) on your disk.
^bCOMMENTS^b
With DISKREET, individual files or groups of files can be
encrypted with their own passwords. You must supply the
correct password to decrypt a file.
Alternatively, an NDisk, or protected area of a disk, can be
created. An NDisk looks like a hidden file to DOS, but
behaves like a disk drive. Once the NDisk is opened by
password, all files in the NDisk are automatically encrypted
and decrypted as they are used. When the NDisk is closed, the
files are inaccessible.
^bNote:^b Because the NDisk option of Diskreet requires a
device driver, be sure to read the manual and the READ.ME
file before loading it via the command line.
You must create, delete, or modify NDisks in the full-screen
mode.
The DISKREET options are:
^b/ON^b
Enable the Diskreet device driver.
^b/OFF^b
Disable the Diskreet device driver.
^b/CLOSE^b
Close all open NDisks.
^b/SHOW[:drive]^b
Show NDisks (clears Hidden attribute)
for specified drive (if omitted,
default drive).
^b/HIDE[:drive]^b
Hide NDisks (sets Hidden attribute) for
specified drive (if omitted, default
drive).
^b/ENCRYPT:pathname^b Encrypt the specified file or files.
^b/DECRYPT:pathname^b Decrypt the specified file.
^b/PASSWORD:string^b String is the password set for the file
encryption and decryption (from 6 to 40
characters).
^bEXAMPLE^b
Encrypt the file DEEPTHRT.TXT from the command line:
diskreet /encrypt:deepthrt.txt /password:rosebud
Encrypt a group a files to one encrypted file:
diskreet /encrypt:*.txt /password:cheryl
^bSYNTAX
(External Norton Utility)^b
DISKTOOL [/DOSRECOVER] [/SKIPHIGH]
DISKTOOL [/MAKEBOOT] [/SKIPHIGH]
DISKTOOL [/MARKCLUSTER] [/SKIPHIGH]
DISKTOOL [/REVIVE] [/SKIPHIGH]
DISKTOOL [/SAVERESCUE|/RESTORE] [/SKIPHIGH]
^bPURPOSE^b
Six tools for data protection and recovery.
^bCOMMENTS^b
Disk Tools can be operated in full-screen mode only. With the
command line switches you can start the program with a
pre-selected operation.
The DISKTOOL options are:
^b/DOSRECOVER^b
Recover from DOS RECOVER.
^b/MAKEBOOT^b
Make a disk bootable.
^b/MARKCLUSTER^b Mark a cluster.
^b/REVIVE^b
Revive a defective diskette.
^b/RESTORE^b
Restore "Rescue" diskette.
^b/SAVERESCUE^b
Create "Rescue" diskette.
^b/SKIPHIGH^b
Skip using high memory.
See also ^rNDD^r.
^bEXAMPLE^b
Revive a defective floppy disk:
disktool /revive
^bSYNTAX
(External Norton Utility)^b
DS [pathname]
DS sort-keys [pathname] [/S]
^bPURPOSE^b
Sort the directory order of files by name, extension, date,
time, and size.
^bCOMMENTS^b
You can combine any number of ^bsort keys^b so that files
that are the same by one key can be arranged in order by the
next key. When a directory is sorted, all subdirectories are
grouped first, followed by all files.
In full-screen mode, a file can be placed at any location in
the sort order. You can make finding frequently accessed files
easier by placing them first in their directories.
The DS options are:
^bpathname^b
Directory to be sorted.
^bsort-keys^b Sort by keys in order specified:
^bN^b
Name
^bE^b
Extension
^bD^b
Date
^bT^b
Time
^bS^b
Size
^b/S^b
Sort subdirectories.
Add a minus sign (-) to any of the sort keys to reverse the
order. More than one key can be specified for the sort order.
If you do not specify a sort key, DS loads in the interactive
mode.
^bNote:^b If you are using NDOS, the directory order will
appear in the NDOS order. By default this is an alphabetic
sort with directories first. The DIR output in NDOS can be
changed with an ALIAS or use of the DIRCMD environment
variable.
See also ^rDIR^r and ^rALIAS^r.
^bEXAMPLE^b
Sort the files in the DATA directory by reverse order of
extension, and then filename:
ds e-n c:\data
^bSYNTAX
(External Norton Utility)^b
EP /ON [/SKIPHIGH]
EP /OFF|/UNINSTALL
EP /STATUS
^bPURPOSE^b
Saves erased files for reliable file recovery.
^bCOMMENTS^b
Erase Protect is a small, memory-resident program (TSR) that
protects your data by moving erased or deleted files to a
hidden directory called "TRASHCAN" for future recovery, if
needed.
Use UnErase to recover erased files.
The EP options are:
^b/ON^b
Enable Erase Protect.
^b/SKIPHIGH^b
Do not load into High memory.
^b/OFF^b
Uninstall Erase Protect.
^b/UNINSTALL^b Uninstall Erase Protect (same as /OFF).
^b/STATUS^b
Display Erase Protect status.
You must enter the full-screen mode to specify such things as
protect all files or specified files, how many days to keep
files before overwriting them, how much disk space to allow
for these files, and how often you wish to purge the
"trashcan."
See also ^rUNERASE^r.
^bEXAMPLE^b
For maximum protection, place the following line in your
AUTOEXEC.BAT file:
ep /on
^bSYNTAX
(External Norton Utility)^b
FA [pathname] [/A[+|-]] [/HID[+|-]] [/R[+|-]] [/SYS[+|-]]
[/CLEAR] [/P] [/S] [/T] [/U]
FA [pathname] /DIR[+|-]
^bPURPOSE^b
Display, set, or clear the attributes of files and
directories.
^bCOMMENTS^b
FA is a command line utility (no full-screen interface).
The FA options are:
^b/A^b
Archive
^b/HID^b
Hidden
^b/R^b
Read-only
^b/SYS^b
System
^b/DIR^b
Hidden (directories only)
^b/CLEAR^b Clear (remove) all file attributes.
^b/P^b
Pause after each screen.
^b/S^b
Act on subdirectories.
^b/T^b
Display file or directory totals only.
^b/U^b
Unusual files (those with any attribute set).
The attribute switch by itself lists all files with that
attribute set. If you specify more than one attribute, only
files with all specified attributes will be listed.
To set an attribute, add a plus (+) sign. For example, /HID+
sets the hidden attribute for all specified files. To clear
an attribute, add a minus (-) sign.
If the pathname is omitted, the current directory is assumed.
See also ^rATTRIB^r and ^rDIR^r.
^bEXAMPLES^b
Find all hidden files on a disk:
fa c:\ /s /hid
Hide a directory called SECRETS:
fa c:\secrets /dir+
Remove read-only protection from a file:
fa c:\image.bak /r-
^bSYNTAX
(External Norton Utility)^b
FD pathname [/D[:]date] [/T[:]time] [/P] [/S]
^bPURPOSE^b
Change the file time and date information.
^bCOMMENTS^b
FD is a command line utility (no full-screen interface).
Unlike other command line utilities, FD requires at least a
drive, path, filename, or file specification (with * and ?).
The FD options are:
^b/D[:]date^b Set the date (month-day-year).
^b/T[:]time^b Set the time (hour:minute:second). Only the
hour is required.
^b/P^b
Pause after each screen.
^b/S^b
Include Subdirectories.
Running FD without the /D and /T switches will stamp the
current date and time on all files specified in pathname.
The use of the colon after the /D and /T switches is
optional.
^bEXAMPLE^b
Set the date and time stamps for files with a PRG extension:
fd c:\app\*.prg /d:12-25-91 /t:14:20
^bSYNTAX
(External Norton Utility)^b
FF [pathname] [search-text] [/C] [/S] [/CS] [/BATCH]
[/A[+|-]] [/HID[+|-]] [/R[+|-]] [/SYS[+|-]] [/CLEAR]
[/D[:][date]] [/T[:][time]] [/NOW]
[/O:pathname] [/TARGET:drive]
^bPURPOSE^b
Search for files across drives and directories.
^bCOMMENTS^b
FF is the "short name" for FILEFIND.
See ^rFILEFIND^R for details.
^bSYNTAX
(External Norton Utility)^b
FILEFIND [pathname] [search-text] [/C] [/S] [/CS] [/BATCH]
[/A[+|-]] [/HID[+|-]] [/R[+|-]] [/SYS[+|-]] [/CLEAR]
[/D[:][date]] [/T[:][time]] [/NOW]
[/O:pathname] [/TARGET:drive]
^bPURPOSE^b
Search for files across drives and directories.
^bCOMMENTS^b
FILEFIND is a multipurpose utility to
* Locate lost files, directories, or data
* Set or clear file attributes
* Change the file date and time stamp
* Check to see if there is room to copy the specified
files to a target disk
The FILEFIND options are:
^bpathname^b
The file specification for the search. Note
the following additional special usages of
wildcards with FILEFIND:
^b*.*^b
Search entire current drive
^b.\*.*^b
Search current directory
^b*:*.*^b
Search all drives
^bsearch-text^b
Optional text to find in files.
^b/C^b
Same as .\*.* (searches current directory).
^b/S^b
Includes files in subdirectories.
^b/CS^b
Case sensitive search.
^b/BATCH^b
Automatically exits program.
^b/A[+|-]^b
Files with archive bit set. Optionally set
or clear Archive Bit.
^b/HID[+|-]^b
Hidden files. Optionally set or clear
hidden bit.
^b/R[+|-]^b
Read-only files. Optionally set or clear
Read-only Bit.
^b/SYS[+|-]^b
System files. Optionally set or clear
System Bit.
^b/CLEAR^b
Clear (remove) all file attributes.
^b/D[:][date]^b
Set the date (month-day-year).
^b/T[:][time]^b
Set the time (hour:minute:second).
^b/NOW^b
Set the date and time to current date and
time.
^b/O:pathname^b
Save the list of files that match the file
specification to the specified file.
^b/TARGET:drive^b Test if specified files will fit on target
drive.
If the search-text contains spaces and/or commas, the entire
search-text must be enclosed in quotes.
If /D or /T is specified and the date or time is omitted, the
file date is set to 0-0-80 and the time stamp is blanked.
FILEFIND can be renamed to FF as a configuration option.
See also ^rATTRIB^r, ^rDIR^r, ^rFA^r, ^rFD^r, ^rFL^r, and ^rTS^r.
^bEXAMPLES^b
Find all files in the current directory that contain the word
"airplane":
filefind .\*.* airplane
Determine if a group of text files will fit on a disk in the
A drive:
filefind c:\data\*.txt /target:a:
^bSYNTAX
(External Norton Utility)^b
FILEFIX [pathname]
^bPURPOSE^b
Diagnose and repair problems in damaged Lotus 1-2-3,
Symphony, or dBASE data files.
^bCOMMENTS^b
FileFix is specifically designed to repair damaged data
files, such as Lotus or Symphony worksheets, or dBASE,
FoxBase, or Clipper databases (or compatible formats).
FileFix operates by examining the damaged file, creating a
new file, and copying into the new file as much good data as
possible, discarding the rest. The original, damaged file is
left intact.
The only FILEFIX option is:
^bpathname^b The name of the damaged file.
File Fix determines the application type from the file
extension.
Although much of the repair work is performed automatically,
File Fix still requires user input at several points. For
this reason, the only command-line option is to specify the
name of the file you want to repair.
For recovering or repairing other types of files, use either
the Norton Disk Doctor or DiskEdit.
See also ^rNDD^r and ^rDISKEDIT^r.
^bEXAMPLE^b
To repair a damaged dBASE database file:
filefix c:\old\ashton.dbf
^bSYNTAX
(External Norton Utility)^b
FL [drive:][filename] [/A] [/P] [/W] [/T] [/F[n]]
^bPURPOSE^b
Locate a file on a drive.
^bCOMMENTS^b
FL is used to locate lost files or directories, or display a
file catalog of the entire disk.
FL a command line utility (no full-screen interface).
The FL options are:
^bdrive^b
Drive to search for file (if omitted, the
default drive).
^bfilename^b File or directory to search for (use the
* and ? wildcard characters also). If omitted,
all files are listed.
^b/A^b
Search for files on All drives.
^b/P^b
Pause after each screen.
^b/W^b
List files in a Wide format.
^b/T^b
Search the PATH statement only.
^b/F[n]^b
Find the first ^bn^b files that match (default
number of matches is 1).
FL will also find hidden and system files.
See also ^rFILEFIND^r.
^bEXAMPLES^b
Find all files called "SETUP" on all drives:
fl setup.* /a
Find all files called "SETUP" that are in directories
specified in the DOS search path:
fl setup.* /t
^bSYNTAX
(External Norton Utility)^b
FS [pathname] [target-drive:] [/P] [/S] [/T]
^bPURPOSE^b
Display the size of one or more files and determine whether
they will fit on another disk drive.
^bCOMMENTS^b
FS is a command line utility (no full-screen interface).
The FS options are:
^bpathname^b
File specification or directory.
^btarget-drive^b Drive to test for enough space for files.
^b/P^b
Pause after each screen.
^b/S^b
Include subdirectories.
^b/T^b
Display Totals (summary information) only.
See also ^rFILEFIND^r.
^bEXAMPLE^b
Find out if a group of files will fit on a floppy drive:
fs *.txt a:
^bSYNTAX
(External Norton Utility)^b
IMAGE [drive]
. [/NOBACK]
^bPURPOSE^b
Saves disk system information for file and disk recovery.
^bCOMMENTS^b
IMAGE takes a snapshot of your system area -- including boot
record, file allocation table, and root directory -- and
saves it to the IMAGE.DAT file for future disk and file
recovery.
With a current IMAGE.DAT file, you can even recover from an
accidental format of your hard disk.
The IMAGE options are:
^bdrive^b
Save information for specified drive (if
omitted, default drive).
^b/NOBACK^b Overwrite the current IMAGE.DAT file. The backup
file IMAGE.BAK is not created.
More than one drive can be specified on the command line.
See also ^rUNERASE^r and ^rUNFORMAT^r.
^bEXAMPLE^b
For maximum protection, place the following line in your
AUTOEXEC.BAT file:
image
^bSYNTAX
(External Norton Utility)^b
LP pathname [output] [/Tn] [/Bn] [/Ln] [/Rn] [/Hn] [/Wn]
[/TABn] [/Sn] [/Pn] [/N] [/80|132] [/HEADERn]
[/WS|EBCDIC] [/SET:pathname] [/PS]
^bPURPOSE^b
Print a text file on a printer or to a file.
^bCOMMENTS^b
LP is a print formatter for text files with many output
control options. Use it to print text files, batch files, and
program source code without having to call up your editor or
word processor.
LP is a command line utility (no full-screen interface).
If you regularly use the same format options, create a batch
file that accepts a file specification (see example below).
The LP options are:
^bpathname^b
Text file to be printed.
^boutput^b
Printer (e.g., LPT1) or file name. If
omitted, PRN: is the default.
^b/Tn /Bn /Ln /Rn^b Top, Bottom, Left, Right margins
(defaults are 3, 3, 5, and 5).
^b/Hn /Wn^b
Height, Width of page (defaults are
66 and 85).
^b/TABn^b
TAB spacing (default is 8).
^b/Sn^b
Line Spacing (default is 1).
^b/Pn^b
Starting Page number (default is 1).
^b/N^b
Turn line Numbering on.
^b/80|132^b
80 or 132-column print width (IBM
compatible printers).
^b/HEADERn^b
Type of HEADER (0, 1, or 2):
^b0^b
no header
^b1^b
current date and time on 1
line (default)
^b2^b
current date and time plus file
date and time on 2 lines
^b/EBCDIC^b
EBCDIC encoded files.
^b/WS^b
Print WordStar files.
^b/PS^b
Generate output for a PostScript printer
(ignores /80|132 switch).
^b/SET:pathname^b
File with printer SETup string.
The setup string in the file specified by /SET uses any
literal characters plus special characters in the following
format:
ASCII codes:
n is the decimal number for the code
you wish to send. Three digits are required; use
leading zeros as required (for example, \013\010
is carriage return and line feed).
^b\X^b
Control codes: X is the control character you wish
to send (for example, \A is Ctrl-A).
See also ^rPRINT^r.
^bEXAMPLES^b
Print a text file on a laser printer (60 lines to the page):
lp myfile.txt lpt1: /h60
The batch file, 2LINE.BAT, contains the following line to
print files with line numbers on a laser printer (see "Batch
File Variables" in the NDOS manual):
lp %1 lpt1: /n /h60
To print MYPROG.C using the batch file:
2line myprog.c
^bSYNTAX
(External Norton Utility)^b
NCACHE [Install Switches] [[drive:] [Drive Switches]
^bPURPOSE^b
Creates a memory buffer to speed up reading and writing from a
disk.
^bCOMMENTS^b
The Norton cache is designed to be used each time that you
use your computer. The only times you will want to disable
the cache are when you run out of memory, when using a disk
optimization program (like Speed Disk), or when you are
running a repair program (like Norton Disk Doctor).
^bNote:^b Since many applications require as much as 500K
to run, you probably should not use the cache if you do
not have extended or expanded memory (the minimum size for
an effective cache is 64K, more is better).
The following Norton Utility programs disable the cache
automatically: Disk Doctor, Speed Disk, and Calibrate. Norton
Backup also disables the cache automatically.
The Norton Cache can be loaded as a device driver or from the
command line. Because of its complexity, please refer to
your manual for complete information regarding NCACHE
installation, usage, defaults, and configuration.
The NCACHE Install Switches are:
^b/INSTALL^b
Install cache using defaults.
^b/OPTIMIZE=S|E|M^b Optimize cache for SPEED, EFFICIENCY, or
MEMORY.
^b/EXT[=n[,m]]^b
Amount of EXTENDED memory for cache.
^b/EXP[=n[,m]]^b
Amount of EXPANDED memory for cache.
^b/DOS[=n]^b
Amount of DOS memory to use for cache.
^b/BLOCK=n^b
Cache block size (512, 1024, 2048, 4096,
or 8192).
^b/USEHIGH=ON|OFF^b Use of high DOS.
^b/USEHMA=ON|OFF^b
Use of XMS HMA.
^b/READ=n^b
Maximum size for Read-Ahead buffer.
^b/WRITE=n^b
Maximum size for IntelliWrites buffer.
^b/DELAY=ss.hh^b
Delay for IntelliWrites (ss seconds,
hh hundredths)
^b/QUICK=ON|OFF^b
Return DOS prompt back after writes.
^b/INI=fspec^b
Configuration file pathname.
^b/REPORT[=ON|OFF]^b Detailed Report of current cache status.
^b/QUIET^b
Quiet mode, only errors are reported.
The NCACHE Drive Switches are:
^b/[-]A^b
Activate/DeActivate cache
^b/[-]C^b
Enable/Disable Caching Subsequent data
^b/[-]I^b
Enable/Disable IntelliWrite Support
^b/[-]W^b
Enable/Disable cache Write-Thru
^b/[-]P^b
Enable/Disable Write Protection
^b/R[=[D][n]]^b Limit Sector Read-Ahead
^b/G=n^b
Limit Caching of Group Sector Reads
The drive switches apply to the specified drive or drives.
^bSYNTAX
(External Norton Utility)^b
NCC [pathname [/SET]]
NCC [pathname [/CURSOR|/DOSCOLOR|/PALETTE]]
NCC [/FAST] [/BW80|/CO80|/nn]
NCC /START:n|/STOP:n [/L] [/N] [/C:comment]
^bPURPOSE^b
^bCOMMENTS^b
In full-screen mode, use NCC to customize many of your PC's
hardware settings, including mouse speed, serial port
configuration, video mode, color palettes, and country codes.
Then, save the settings to a file.
From the command line, you can load either all the saved
settings with /SET, or a single setting with /CURSOR,
/DOSCOLOR, or /PALETTE.
Up to four stopwatches can be run from the command line.
You will realize an immediate productivity benefit by
increasing keyboard speed.
The NCC options are:
^bpathname^b
File containing all NCC settings.
^b/SET^b
Set all the options stored in the NCC
settings file.
^b/CURSOR^b
Set only the cursor rate.
^b/DOSCOLOR^b
Set only the DOS colors.
^b/PALETTE^b
Set only the palette information.
^b/FAST^b
Set the keyboard to its fastest rate.
^b/BW80^b
Set display mode to black and white, 25 x 80.
^b/CO80^b
Set display mode to color, 25 x 80.
^b/nn^b
Set the number of lines for EGA (25, 35,
or 43) or VGA (25, 40, or 50).
^b/START[:n]^b Start stopwatch number ^bn^b (default is 1).
^b/STOP[:n]^b
Stop stopwatch number ^bn^b (default is 1).
^b/L^b
Display current time and date on left side
of screen.
^b/N^b
Do not display current time and date.
^b/C:comment^b Display a comment on the screen when NCC is
executed; useful when you are running multiple
timers via batch files. If a comment includes
spaces or commas, enclose the entire comment
within quotes.
See also ^rBE SA^r, ^rCLS^r, ^rCOLOR^r, ^rMODE^r, and ^rTIMER^r.
^bEXAMPLES^b
Set the screen to 50 lines on a VGA display:
ncc /50
Set the keyboard to its fastest rate:
ncc /fast
^bSYNTAX
(External Norton Utility)^b
NCD [drive:][path] [/N] [/R]
NCD [drive:] /V[:label]
NCD [drive:] /L[[:output] [/A] [/G|/NG] [/T]] [/P]
NCD MD | RD | SIZE path
NCD COPY source destination [/DELETE]
NCD GRAFT source destination
NCD RMTREE path [/BATCH]
^bPURPOSE^b
Manages your directories and allows quick directory changing
with only a partial directory name.
^bCOMMENTS^b
NCD allows you to change to any directory without having to
type the entire path, create or remove directories, and prune
and graft branches of the directory tree.
The directory structure is stored in the TREEINFO.NCD file
located in the root directory (on network drives it may be in
the NCDTREE directory).
When you use DOS's MD and RD commands, the TREEINFO.NCD file
is not updated and ends up containing some out-of-date
information. NCD will neither display the directory name nor
go to it when used in the command line. You may need to
Rescan (/R) from time to time.
Use NCD COPY with /DELETE to move branches of the directory
tree across drives.
The COPY, GRAFT, and RMTREE options must be enabled from the
^uConfiguration^u option of the ^udiRectory^u menu in full-screen
mode before they can be used from the command line.
The NCD options are:
^bdrive^b
Drive letter of drive containing directory.
^bpath^b
The directory name. You only need specify
the end-point directory, not the whole path.
^bsource^b
The directory name of a branch of the
directory tree to copy or graft.
^bdestination^b
The directory to receive a copied or grafted
branch of the directory tree.
^bMD path^b
Create a directory and add it to the NCD
tree.
^bRD path^b
Remove the named directory both from the
disk and the NCD tree.
^b/R^b
Rescan disk directory (update TREEINFO.NCD
file).
^b/N^b
Do not write or update TREEINFO.NCD file.
This may be especially useful when working
with write-protected disks.
^b/V:label^b
Places a volume label on the disk using
uppercase and lowercase characters or
embedded spaces (place label in quotes).
^b/L[:output]^b
List directories, optionally sending output
to a file (output).
^b/A^b
List directories of all drives.
^b/G^b
Display the directory tree graphically.
^b/NG^b
Display tree using non-graphic characters.
^b/T^b
Display the total number and size of all
files in each directory.
^b/P^b
Pause after each screen
^bGRAFT^b
Move a branch of the directory tree (source)
to another location (destination).
^bRMTREE^b
Remove (prune) a branch of the tree.
^b/BATCH^b
Skip all prompts and exit to DOS when done.
^bCOPY^b
Copy a branch of the directory tree (source)
to another location (destination).
^b/DELETE^b
Remove the branch after the copy is
completed. Use NCD COPY with /DELETE to move
branches tree across drives.
^bSIZE^b
Get the size of a directory tree.
When creating (MD) or removing (RD) directories, don't begin
the path with a backslash (\) unless you mean a directory
in the root.
See also ^rCD^r, ^rCDD^r, ^rMD^r, ^rRD^r, ^rPOPD^r, and ^rPUSHD^r.
^bEXAMPLES^b
Change to the directory \BRIEF\BACKUP:
ncd back
Move (prune and graft) a branch of the directory tree:
ncd graft \data\text \memos
^bSYNTAX
(External Norton Utility)^b
NDD [drive:]
. [/C|/Q] [/R[A]:pathname] [/X:drives]
[/SKIPHIGH]
NDD [drive:]
. [/REBUILD] [/SKIPHIGH]
NDD [drive:]
. [/UNDELETE] [/SKIPHIGH]
^bPURPOSE^b
Automatically diagnose and repair damaged disks.
^bCOMMENTS^b
Diagnose and repair disks that are damaged or defective, or
perform routine diagnostics and inspection to prevent such
problems from developing.
When using NDD to diagnose and repair a problem disk, you
will probably want to operate in full-screen mode. Use the
command line switches for routine maintenance, such as a
diagnosis of your disk every time you start up your computer.
More than one drive can be specified from the command line.
The NDD options are:
^bdrive^b
Disk drive to diagnose or repair.
^b/C^b
Complete: test the Partition Table, Boot
Record, root directory, lost clusters, and
perform a surface test.
^b/Q^b
Quick: all tests except the surface test.
^b/R[A]:pathname^b Write (or Append) a report of all tests
performed to the specified file.
^b/X:drives^b
Exclude drives from testing (for
example, /X:def).
^b/REBUILD^b
Rebuild an entire disk that has been
destroyed.
^b/UNDELETE^b
Undelete a DOS partition that was
previously skipped. (For example, NDD
detected an old DOS partition and asked if
you wanted to undelete it. If you responded
"no," this switch allows you to go back
and undelete it.)
See also ^rCALIBRAT^r, ^rDISKEDIT^r, and ^rDISKTOOL^r.
^bEXAMPLES^b
Place the following line in your AUTOEXEC.BAT file to perform
a quick test each time you boot:
ndd /q
Perform a complete test of two drives and send a report to an
existing file on a floppy disk:
ndd c: d: /c /ra:a:\test.log
^bSYNTAX
(External Norton Utility)^b
NORTON [/BW|/LCD] [/G0|/G1|/G2] [/NOZOOM]
^bPURPOSE^b
Run the Norton Utilities (and other programs) from a menu.
^bCOMMENTS^b
Access all of the Norton Utilities from a full-screen menu
with descriptions and help for all of the programs. You can
add other programs and descriptions to the menu.
The ^uAdvise menu^u of the NORTON program contains options to
help solve common disk problems and interpret DOS, CHKDSK,
and application error messages. NORTON will recommend a
course of action and even run the appropriate repair program.
The NORTON program also includes full re-configuration
capabilities for all the utilities. You can easily set up
your CONFIG.SYS file to configure and install the Norton
Cache (NCACHE), NDOS, and DISKREET; set up AUTOEXEC.BAT to
install DISKMON and EP, run IMAGE and NDD /QUICK, add the
Norton Utilities directory to the PATH statement, and set the
NU environment variable.
The command line options for NORTON are used to set the
display mode. The same options can also be used on the command
line with any of the utilities that have a full-screen
interface.
The NORTON options are:
^b/BW^b
Forces the use of the Black and White color set.
^b/LCD^b
For laptop displays. Forces the use of the LCD
color set.
^b/G0^b
Disable font redefinitions and graphic mouse.
^b/G1^b
Disable the graphic mouse (EGA/VGA only).
^b/G2^b
Disable graphic dialogs (EGA/VGA only).
^b/NOZOOM^b Disable dialog box zooming.
^bEXAMPLE^b
Force the use of black and white:
Norton /bw
^bSYNTAX
(External Norton Utility)^b
SD [drive:] [/F|/FD|/FF] [/Sorder] [/V] [/B] [/SKIPHIGH]
SD [drive:] [/Q|/U] [/V] [/B] [/SKIPHIGH]
^bPURPOSE^b
Reorganizes files on disks for optimal performance.
^bCOMMENTS^b
SD is the "short name" for SPEEDISK.
See ^rSPEEDISK^r for details.
^bSYNTAX
(External Norton Utility)^b
SF [drive:] [/A] [/S|/B] [/V:label] [/Q|/D]
[/N:n] [/T:n] [/F:size] [/1] [/4] [/8]
^bPURPOSE^b
Safely and quickly format a disk.
^bCOMMENTS^b
SF is the "short name" for SFORMAT.
See ^rSFORMAT^r for details.
^bSYNTAX
(External Norton Utility)^b
SFORMAT [drive:] [/A] [/S|/B] [/V:label] [/Q|/D]
[/N:n] [/T:n] [/F:size] [/1] [/4] [/8]
^bPURPOSE^b
Safely and quickly format a disk.
^bCOMMENTS^b
SFORMAT is a safe and flexible replacement for the DOS FORMAT
command.
For maximum safety, a configuration option of the Norton
Utilities lets you rename SFORMAT to FORMAT (and the DOS
FORMAT.COM to XXFORMAT.COM) to make sure that the safer
Norton program is always invoked.
Another configuration option is to rename SFORMAT to SF.
The SFORMAT options are:
^bdrive^b
Drive letter of disk to format.
^b/A^b
Automatic mode: The program does not pause
during operation and returns to DOS when
complete.
^b/S^b
Copy system files to the disk you are
formatting.
^b/B^b
Leave space for system files on the disk.
^b/V:label^b Place a volume label on the disk.
^b/D^b
DOS Format (same as the DOS FORMAT command).
^b/Q^b
Quick format (reinitialize system area only).
^b/N:n^b
Number of sectors per track (8, 9, 15, or 18).
^b/T:^b n
Number of tracks (40 or 80).
^b/F:size^b
Size of diskette (/360, /720, /1.2, /1.44, or
/2.88).
^b/1^b
Format for single-sided use.
^b/4^b
Format a 360K diskette in a 1.2M drive.
^b/8^b
Format 8 sectors per track.
A default configuration for SFORMAT can be set in full-screen
mode.
See also ^rFORMAT^r, ^rIMAGE^r, and ^rUNFORMAT^r.
^bEXAMPLE^b
Format a 360K disk in a 1.2M drive:
sformat a: /f:360
Perform a "quick" format of an already formatted disk to
remove all existing files:
sformat a: /q
^bSYNTAX
(External Norton Utility)^b
SI [/AUTO:n] [/N] [/SOUND]
SI [drive:] [/SUMMARY]
SI [drive:] [/DI]
SI [/TSR]
SI [/DEMO]
^bPURPOSE^b
Display system configuration information and performance
statistics.
^bCOMMENTS^b
SI is the "short name" for SYSINFO.
See ^rSYSINFO^r for details.
^bSYNTAX
(External Norton Utility)^b
SPEEDISK [drive:] [/F|/FD|/FF] [/Sorder] [/V] [/B] [/SKIPHIGH]
SPEEDISK [drive:] [/Q|/U] [/V] [/B] [/SKIPHIGH]
^bPURPOSE^b
Reorganizes files on disks for optimal performance.
^bCOMMENTS^b
SPEEDISK improves hard disk performance and speeds up
disk-access time by consolidating and unfragmenting the data
on your disk.
The SPEEDISK options are:
^b/F^b
Full optimization.
^b/FD^b
Full optimization with directories first.
^b/FF^b
Full optimization with file reorder.
^b/Q^b
Unfragment free space (quick compress
optimization).
^b/U^b
Unfragment files only.
^b/S^b
Sort files in the specified ^border^b, one
of the following:
^bN^b
Name
^bE^b
Extension
^bD^b
Date and time
^bS^b
Size
Add a minus (-) sign to the specified order to
reverse the sort.
^b/B^b
Reboot after optimization.
^b/V^b
Verify sector read after writing data to disk.
^b/SKIPHIGH^b Skip loading data into high memory.
When using Speed Disk for the first time, you should use
the full-screen mode to set and store the Speed Disk
configuration. Use the command line switches to perform
quick optimizations for routine maintenance.
SPEEDISK can be renamed to SD as a configuration option.
See also ^rCALIBRAT^r.
^bEXAMPLE^b
Perform a quick optimization:
speedisk c: /q
^bSYNTAX
(External Norton Utility)^b
SYSINFO [/AUTO:n] [/N] [/SOUND]
SYSINFO [drive:] [/SUMMARY]
SYSINFO [drive:] [/DI]
SYSINFO [/TSR]
SYSINFO [/DEMO]
^bPURPOSE^b
Display system configuration information and performance
statistics.
^bCOMMENTS^b
SYSINFO provides a complete report of disk and CPU speed
tests, current memory usage (including TSRs, device drivers,
and memory blocks), extended and expanded memory, interrupt
vectors and IRQ values, CMOS configuration settings, network
information, and your partition table.
The SYSINFO options are:
^bdrive^b
Drive on which information is desired (if
omitted, default drive).
^b/AUTO:n^b
Automatically cycle through all information
screens, pausing ^bn^b seconds between screens.
^b/N^b
No Memory Scan: bypass the test that probes
live memory.
^b/SOUND^b
Beep between CPU tests.
^b/DI^b
Drive Information: summary screen only.
^b/SUMMARY^b System information: summary screen only.
^b/TSR^b
Display list of TSR programs.
^b/DEMO^b
Demo mode: cycle through the benchmark tests and
summary screen only.
SYSINFO can be renamed to SI as a configuration option.
See also ^rMEM^r.
^bEXAMPLES^b
For a quick report of disk information:
sysinfo /di
List TSRs in memory:
sysinfo /tsr
^bSYNTAX
(External Norton Utility)^b
TS [pathname] [string] [/S] [/T] [/A] [/CS] [/EBCDIC]
[/LOG] [/WS]
TS [string] /D|/E [/Cn] [/A] [/CS] [/EBCDIC] [/LOG] [/WS]
^bPURPOSE^b
Search for text strings in files, on disks, or in erased
areas.
^bCOMMENTS^b
TS is a command line utility (no full-screen interface).
The TS options are:
^bstring^b
Text to search for. Use quotes around the string
if it contains embedded spaces.
^b/S^b
Include subdirectories in the search.
^b/T^b
Set non-interactive summary total.
^b/D^b
Search the entire disk.
^b/E^b
Search only the erased file space of the disk.
^b/Cn^b
Start searching at cluster n.
^b/A^b
Automate search (answer "yes" to all prompts).
^b/CS^b
Case Sensitive search.
^b/EBCDIC^b Files being searched are encoded in EBCDIC.
^b/LOG^b
Format output for a LOG suitable for a printer
or a file.
^b/WS^b
Specifies that characters in the IBM PC extended
character set not be considered in the search.
See also ^rFILEFIND^r.
^bEXAMPLES^b
Find "money" everywhere on a disk:
ts money /d
Find the names of batch files that contain "a lot of money":
ts *.bat "a lot of money" /t
^bSYNTAX
(External Norton Utility)^b
UNERASE [pathname] [/IMAGE|/MIRROR] [/NOTRACK]
^bPURPOSE^b
Recover erased files.
^bCOMMENTS^b
Use UNERASE to automatically recover erased (deleted) files.
The quicker you try to recover a file after it is erased, the
greater the chance you have of recovering all the data (before
its file space is overwritten by another file).
Use Erase Protect (EP) to guarantee that you will not have
any problems recovering erased files, even if you deleted the
file several days ago.
The UNERASE options are:
^b/IMAGE^b
Use Image recovery information (excludes
Mirror information).
^b/MIRROR^b
Use Mirror recovery information (excludes
Image information).
^b/NOTRACK^b Exclude Delete Tracking information.
For badly fragmented or partially overwritten files, you must
use Manual UnErase in the full-screen mode.
In full-screen mode, UNERASE has tools to help find text in
erased files and find files even if the directory containing
the file has been removed.
See also ^rEP^r, ^rIMAGE^r, and ^rTS^r.
^bEXAMPLE^b
Recover an erased file:
unerase needthis.lst
Recover an erased file using IMAGE data:
unerase needthis.lst /image
^bSYNTAX
(External Norton Utility)^b
UNFORMAT [drive:] [/IMAGE|/MIRROR]
^bPURPOSE^b
Recover a hard disk that has been accidentally formatted,
corrupted by a power surge, or damaged by a virus.
^bCOMMENTS^b
An accidental use of the FORMAT command has always been
considered the worst possible data disaster. With UNFORMAT,
it is often possible to recover all the data on the disk. A
near-perfect recovery can be made if you have previously
taken a snapshot of the disk using the IMAGE command.
With floppy disks, always use Norton SFORMAT command. The
data area of the disk does not get wiped and makes it
possible to recover data lost by an accidental format
operation.
The UNFORMAT options are:
^bdrive:^b
Drive letter of disk to unformat.
^b/IMAGE^b
Use Image recovery information (excludes
Mirror information).
^b/MIRROR^b Use Mirror recovery information (excludes
Image information).
See also ^rIMAGE^r and ^rSFORMAT^r.
^bEXAMPLE^b
Recover from an accidental format of a disk:
unformat c: /image
^bSYNTAX
(External Norton Utility)^b
WIPEINFO [drive:] [/E] [/Gn] [/Rn] [/Vn] [/BATCH]
WIPEINFO [pathname] [/N] [/K] [/S] [/Gn] [/Rn] [/Vn] [/BATCH]
^bPURPOSE^b
Destroy data in files or on disks.
^bCOMMENTS^b
Use WIPEINFO to completely destroy deleted data by overwriting
the disk area where it was stored.
^bWarning:^b Data overwritten by WipeInfo cannot be
recovered, even with UnErase or UnFormat.
WIPEINFO is designed with safeguards to prevent accidental
wiping of a file. You must respond to a series of prompts
before the deed is done. Use the /BATCH switch (carefully) to
bypass the prompts.
The WIPEINFO options are:
^bdrive:^b
Drive letter of disk to wipe.
^bpathname^b Name of file to wipe.
^b/E^b
Wipes all Erased and unused data space only.
(All current data is left untouched.)
^b/N^b
Non-wiping mode: delete files, but do not wipe.
^b/K^b
Wipe only the slack at the end of a file, but
leave the file's data untouched.
^b/S^b
Wipe or delete files in subdirectories also.
^b/Gn^b
Follow Government specifications for security
wiping. Repeat pattern ^bn^b times (default is 3).
^b/Rn^b
Repeat wiping ^bn^b times (default n is 1).
^b/Vn^b
Set the Value used to overwrite the wipe area;
^bn^b can be any number from 0 to 255 (default is 0).
^b/BATCH^b
Execute command without prompting.
WIPEINFO conforms to Government security specifications for
wiping information.
^bEXAMPLE^b
Destroy a file:
wipeinfo hermetic.mys
Wipe all erased and unused data space on a drive 3 times:
wipeinfo c: /e /r3
Define an alias for a command. Load or display the alias list.
ALIAS [/P][/R [drive:][path]filename...] [name[=][value]]
name Alias name (up to 80 characters).
value Command sequence (up to 255 characters).
/P Pause: Halt display after each screen.
/R Read: Load an alias list from a file.
ALIAS with only name displays alias value. ALIAS by itself
lists all aliases in effect.
Display or change file or directory attributes.
ATTRIB [/DS][-|+[AHRS]] [drive:][path]filename ...
/D Directory: Modify directory attributes.
/S Subdirectory: Include files in all subdirectories.
+A Set the archive attribute.
-A Clear the archive attribute.
+H Set the hidden attribute.
-H Clear the hidden attribute.
+R Set the read-only attribute (write-protected).
-R Clear the read-only attribute.
+S Set the system file attribute.
-S Clear the system file attribute.
Use DIR with /A to display files with specified attributes only.
Commands to enhance batch files.
BE command [parameters] [/DEBUG]
BE pathname [ [GOTO] label]
commands are:
ASK PRINTCHAR
BEEP REBOOT
BOX ROWCOL
CLS SA
DELAY SHIFTSTATE
EXIT TRIGGER
GOTO WEEKDAY
JUMP WINDOW
MONTHDAY
/DEBUG Display the ERRORLEVEL code.
pathname Name of a Batch Enhancer script-file.
label Label in file to start execution
For help on a specific command type:
BE command /?
Request input from the keyboard and set an exit code (ERRORLEVEL).
BE ASK "prompt" [key-list] [DEFAULT=key] [TIMEOUT=n]
[ADJUST=n] [color] [/DEBUG]
prompt Text string to display when the command runs.
key-list List of response keys (characters or numbers).
DEFAULT Key returned if no key is pressed within the
timeout period, or if the user presses Enter.
TIMEOUT Time in seconds before the default key is
returned. If n is zero, or no timeout is
specified, ASK will wait forever.
ADJUST Adjust the return value by this amount.
color SA (Screen Attribute) format color specification
for the text of the prompt (see BE SA).
/DEBUG Display the ERRORLEVEL value returned.
A beep is generated if the user presses a key that is not in
the designated key-list.
Specify the frequency and duration of a tone through the
speaker or a series of tones in a script-file.
BE BEEP [/Dn] [/Fn] [/Rn] [/Wn]
BE BEEP script-file [/E]
/Dn Duration of the tone, in 1/18ths of a second.
/Fn Frequency of the tone, n is cycles per second (Hertz).
/Rn Repeat the tone n times.
/Wn Wait between tones n/18ths of a second.
/E Echo the quoted text in comments from a script-file.
Draw a rectangle at a specified location on the screen.
BE BOX top left bottom right [SINGLE | DOUBLE] [color]
top Row for upper left corner of box.
left Column for upper left corner of box.
bottom Row for lower right corner of box.
right Column for lower right corner of box.
SINGLE Single line outline.
DOUBLE Double line outline.
color SA (Screen Attribute) format color specification
for the box. See BE SA.
The default box border is double line. Text within the box is
not overwritten.
Clear the screen, optionally using the specified attribute.
BE CLS [color]
color SA (Screen Attribute) format color specification. See BE SA.
Pause execution of a batch file for a specified length of time.
BE DELAY ticks
ticks The number of clock ticks (1/18 second) to pause.
Returns the day of the month (1 to 31) to the batch file as an
exit code (ERRORLEVEL).
BE MONTHDAY [/DEBUG]
/DEBUG Display the ERRORLEVEL value returned.
Display a specified character a given number of times at the
current cursor location.
BE PRINTCHAR character, count [color]
character Character to display.
count Number of times to display the character.
color SA (Screen Attribute) format color specification
for the character. (See BE SA.)
Perform a warm boot of the computer.
BE REBOOT [/V]
/V Verify: Prompt the user to confirm the reboot.
Position the cursor at the specified row and column location,
optionally displaying text.
BE ROWCOL row col ["text"] [color]
row Row to move the cursor to.
col Column to move the cursor to.
text Optional line of text to display.
color SA (Screen Attribute) format color specification
for the text. See BE SA.
Control the display of attributes and colors.
SA NORMAL|UNDERLINE|REVERSE [/N]
SA [BRIGHT|BLINKING] foreground [ON background] [/N] [/CLS]
UNDERLINE Only available on monochrome monitors (will be blue
foreground on a color monitor).
REVERSE Switch foreground and background colors.
NORMAL Use to undo an underline or reverse setting.
foreground Foreground color from the table below.
background Background color from the table below.
WHITE BLACK RED MAGENTA
BLUE GREEN CYAN YELLOW
/N Do not set the border color (the border normally
defaults to same color as background).
/CLS Clear the screen after setting the attributes.
Report the status of the Shift keys, the Alt key, and the Ctrl key.
BE SHIFTSTATE [/DEBUG]
/DEBUG Display the ERRORLEVEL value returned.
The SHIFTSTATE command returns an exit code (ERRORLEVEL) that
defines the status of the Left Shift, Right Shift, Alt keys,
and Ctrl keys at the time it is run.
1 Right Shift key
2 Left Shift key
4 Ctrl key (left or right)
8 Alt key (left or right)
The exit codes for the four keys can be added together for multiple keys.
Halt execution of a batch file until the time specified.
BE TRIGGER hh:mm [AM | PM]
hh:mm Time in 24-hour format (0:00 to 23:59).
AM | PM Optionally, specify time in 12-hour format.
12:00 am is the same as 0:00, or midnight; 12:00 pm is noon.
Return the day of the week to the batch file as an exit code (ERRORLEVEL).
BE WEEKDAY [/DEBUG]
/DEBUG Display the ERRORLEVEL value returned.
Sunday is returned as 1, and Saturday is returned as 7.
Draw a solid rectangle with a double-line border, optionally
using a drop shadow and a zoom effect.
BE WINDOW top left bottom right [color] [ZOOM | EXPLODE] [SHADOW]
top Row for upper left corner of box.
left Column for upper left corner of box.
bottom Row for lower right corner of box.
right Column for lower right corner of box.
color SA (Screen Attribute) format color specification
for the window. See BE SA.
ZOOM Zooms the window while drawing it (EXPLODE is a synonym).
SHADOW Adds a see through drop "shadow" to the window.
The boxes are solid filled; any text within the confines of the
box is overwritten.
Beep the speaker.
BEEP [frequency duration ...]
frequency The frequency is specified in Hertz.
duration The duration in 1/18th second intervals.
Turn extended Ctrl-C (Ctrl-Break) checking on or off.
BREAK [ON | OFF]
BREAK turns the extended Ctrl-C (Ctrl-Break) checking ON or OFF.
BREAK by itself displays the current BREAK status.
Call a secondary batch file.
CALL [drive:][path]filename
Batch files can be nested up to eight levels deep.
Terminate batch processing.
CANCEL
CANCEL ends all batch file processing, regardless of the
level of batch file nesting.
Display or change the current directory.
CD [drive:][path]
CHDIR [drive:][path]
CD by itself or with just drive: displays the current directory.
CD.. (two dots) changes to the parent directory. Add additional dots
(one per level) to move higher up the directory tree. CD.... (four dots)
changes to the directory two higher than the parent.
CD and CHDIR are the same command.
Change the current disk drive and directory.
CDD [drive:]path
CDD is similar to CD or CHDIR, except it can also change the default
disk drive.
Display or change the current system code page.
CHCP [nnn]
nnn Country code page.
CHCP with no parameters displays the current code page.
Code page switching allows you to select different character
sets for language support. To use code page switching, you
must have an EGA or VGA display and/or an appropriate printer,
and DOS 3.3 or above.
Display or change the current directory.
CD [drive:][path]
CHDIR [drive:][path]
CHDIR by itself or with just drive: displays the current directory.
CHDIR.. (two dots) changes to the parent directory. Add additional dots
(one per level) to move higher up the directory tree. CHDIR.... (four dots)
changes to the directory two higher than the parent.
CD and CHDIR are the same command.
Clear the video display, optionally to the specified colors.
CLS [[BRIGHT] [BLINK] fg ON bg]
fg The foreground color.
bg The background color.
The available colors are:
Black Blue Green Red
Magenta Cyan Yellow White
CLS clears the display and moves the cursor to the upper left
corner.
Set the screen display colors.
COLOR [[BRIGHT] [BLINK] fg ON bg]
fg The foreground color.
bg The background color.
The available colors are:
Black Blue Green Red
Magenta Cyan Yellow White
Copy or append one or more files.
COPY [/MPQRUV] [drive:][path]filename[+]...[/A][/B]
[[drive:][path]filename][/A][/B]
/M Modified: Copy only those files with the archive bit set.
The archive bit will NOT be cleared after copying.
/P Prompt: Confirm each file copy (Y or N).
/Q Quiet: Don't display filenames as they are copied.
/R Replace: Prompt before overwriting an existing file.
/U Update: Copy only those source files that are newer than a
matching target file, or where a matching target file
doesn't exist.
/V Verify: Make sure that each sector a file is written to
can be read.
/A ASCII: Files are terminated with Ctrl-Z.
/B Binary: Exact number of bytes in the file (ignore Ctrl-Z).
Use + to append source files.
Change the default console device.
CTTY device
device Any device that can perform standard character I/O.
Display and (optionally) change the system date.
DATE [mm-dd-yy]
DATE, by itself, displays the current system date and time, and prompts
for the new date. Press Enter to keep the displayed the date or type a
a new date.
Erase (delete) the specified file(s) from the disk.
DEL [/PQYZ] [drive:][path]filename...
ERASE [/PQYZ] [drive:][path]filename...
/P Prompt: Confirm (Y/N) deletion for each file.
/Q Quiet: Don't display filenames as they are deleted.
/Y Yes: Delete files and directories without prompting.
/Z Zap: Delete hidden, system, and read-only files as well.
DEL and ERASE are the same command.
Pause for a specified period of time.
DELAY [seconds]
seconds Number of seconds to pause.
DELAY by itself pauses processing for one second.
Create, modify, or delete file and subdirectory descriptions.
DESCRIBE pathname ["description"] ...
description Up to 40 characters (use double quotes if entered on
the command line).
Add text descriptions to filenames and subdirectories. The descriptions
are displayed when using DIR with the default single-column option,
or when using SELECT.
Use wildcards (* and ?) and/or multiple filenames with a description
on the command line to give all matching files the same description.
DESCRIBE with just pathname will prompt you for the description.
Display information about files and subdirectories.
DIR [/A:[-rhsda] /O:[-deinsgu] /124BCJKLMNPSTUVW] [[drive:][path]filename...]
/A: Display filenames with specified attributes. Use /A: with no attributes
to display all filenames (including hidden and system).
r Read-only s System a Archive
h Hidden d Directory - Prefix means "not"
/O: Sort sequence, any combination of the following options:
d Date and time n Name u Unsorted (like COMMAND.COM)
e Extension s Size - Reverse the sort order
i File description g Group directories
/1 One column /M oMit total bytes information.
/2 Two columns /N No switches: reset DIR to defaults
/4 Four columns /P Pause
/B Bare (no header or summaries) /S Subdirectories included
/C upperCase /T aTtributes
/J Justify (like COMMAND.COM) /U sUmmary (totals only)
/K No volume label or pathname /V Vertical sort (with /2, /4, or /W)
/L Lowercase /W Wide display
Display the current directory stack.
DIRS displays the directory stack used by PUSHD and POPD, most
recent entries first. The stack holds 255 characters (about
10 to 20 entries).
Draw a box on the screen.
DRAWBOX ulrow ulcol lrrow lrcol style [BRIGHT][BLINK] fg ON bg [FILL bgfill]
ulrow Row for upper left corner.
ulcol Column for upper left corner.
lrrow Row for lower right corner.
lrcol Column for lower right corner.
style Box drawing style:
0 No border
1 Single line
2 Double line
3 Single line on top and bottom, double on the sides
4 Double line on top and bottom, single on the sides
fg Foreground character color.
bg Background character color.
bgfill Background fill color (for the inside of the box).
The available colors are:
Black Blue Green Red
Magenta Cyan Yellow White
Draw a horizontal line on the screen.
DRAWHLINE row columns length style [BRIGHT] [BLINK] fg ON bg
row Start row.
column Start column.
length Length of line.
style Line drawing style:
1 Single line
2 Double line
fg Foreground character color.
bg Background character color.
The available colors are:
Black Blue Green Red
Magenta Cyan Yellow White
Draw a vertical line on the screen.
DRAWVLINE row columns length style [BRIGHT] [BLINK] fg ON bg
row Start row.
column Start column.
length Length of line.
style Line drawing style:
1 Single line
2 Double line
fg Foreground character color.
bg Background character color.
The available colors are:
Black Blue Green Red
Magenta Cyan Yellow White
Turn batch file or command-line echoing on or off, display a message,
or display the echo status.
ECHO [ON | OFF | message]
ECHO by itself displays the current echo status.
Restore the disk drive, directory, environment, and aliases saved
with SETLOCAL.
ENDLOCAL
ENDLOCAL and SETLOCAL can only be used in batch files.
Erase (delete) the specified file(s) from the disk.
DEL [/PQYZ] [drive:][path]filename...
ERASE [/PQYZ] [drive:][path]filename...
/P Prompt: Confirm (Y/N) deletion for each file.
/Q Quiet: Don't display filenames as they are deleted.
/Y Yes: Delete files and directories without prompting.
/Z Zap: Delete hidden, system, and read-only files as well.
DEL and ERASE are the same command.
Edit environment variables and/or aliases.
ESET varname...
varname Environment variable or alias name.
Perform a command, except on the file(s) specified.
EXCEPT (pathname...) command
pathname The excluded file, wildcard set of files (* and ?), or
list of files must be enclosed in parentheses.
EXCEPT prevents operations on the specified file(s) by setting the
hidden attribute, performing the command, and then clearing the hidden
attribute.
EXCEPT will not work with programs or commands that ignore the hidden
attribute including DEL or ERASE with the /Z switch.
Return from a secondary command processor.
EXIT [n]
n The ERRORLEVEL value to return to the calling command processor.
Repeat a command for several items in a set.
FOR %%variable IN (set) [DO] command
%variable A variable name, up to 80 characters preceded by a % sign.
(set) A list of pathnames (including wildcards) or text strings
enclosed within parentheses.
Either a single % or a double %% for the variable will work both from
the command line and within batch files. The "DO" is optional.
Display the total disk space, total bytes used, and total bytes free
on the default or specified drive(s).
FREE [drive:]...
Execute a command in the current directory and its subdirectories.
GLOBAL [/IQ] command [args]
/I Ignore: GLOBAL will not terminate if the command returns
a non-zero exit code.
/Q Quiet: Do not display the directory names as each directory
is accessed.
Call a subroutine in a batch file.
GOSUB label
GOSUB calls the specified label as a subroutine. The subroutine must
end with a RETURN statement. After the RETURN, NDOS will continue
processing with the command following the GOSUB command.
Continue batch file processing at the line following the label.
GOTO label
GOTO changes the current position in the batch file to the line
immediately following the label.
Display, read, or clear the history list.
HISTORY [/F] [/P] [/R pathname]
/F Free: Clear the command history list.
/P Pause: Halt the display after each screen.
/R Read the command history from the specified file.
HISTORY by itself displays the current history list. You can save the
history list by redirecting the output of HISTORY to a file.
Allow conditional execution of commands.
IF [NOT] ERRORLEVEL [op] n command
IF [NOT] string1 op string2 command
IF [NOT] EXIST pathname command
IF [NOT] ISALIAS aliasname command
IF [NOT] ISDIR [drive:]path command
command An internal NDOS command or alias, an external command, or
a batch file to execute if the test condition is true.
NOT The command is executed when the condition is false.
op Relational operator: EQ (or ==) NE LT LE GE GT
ERRORLEVEL [op] n Exit code of the preceding program (default is GE).
string1 op string2 Compare two strings (case is ignored). Strings should
be enclosed in double quotes. If both arguments begin
with digits, it is a numeric comparison.
EXIST pathname True if the specified file exists.
ISALIAS aliasname True if the specified name is an alias.
ISDIR [drive:]path True if the directory exists.
IF statements can be nested.
Allow IF/THEN/ELSE conditional execution of commands.
IFF [NOT] condition THEN ^command^ ELSE[[IFF [NOT]] condition THEN]
^command^ ENDIFF
See the IF command for a list of the tests available.
Get a single keystroke environment variable from standard input.
INKEY [/Wn] [text] %%varname
/Wn Wait: Timeout period (n is the number of seconds to
wait for a key press).
An ASCII value from 1 to 255 is stored as a character. Extended
characters, such as function keys and cursor keys, are stored as a
string in decimal format with a leading @ (for example, the F1
function key is @59).
Enter an environment variable from the standard input.
INPUT [/Wn] [text] %%varname
/Wn Wait: Timeout period (n is the number of seconds to
wait for a key press).
All characters entered up to, but not including, the carriage return
are stored in the variable.
Feed keystrokes to an application from a batch file or alias.
KEYSTACK ["string"] [nn] [@nn] [!]
"string" Characters entered within double quotes ("abc") will be
stored "as is" in the keyboard buffer.
nn Numbers not enclosed in quotes are ASCII decimal codes, for
example, 13 (Enter), or 27 (Escape).
@nn Numbers preceded by @ are extended keyboard codes generated
by the Alt key, cursor pad keys, and the Function keys (for
example, @59 is the F1 function key).
! Clears all pending keystrokes, both in the KEYSTACK buffer
and in the keyboard buffer.
The number (nn) 0 is a special case; it is used with programs that flush
the keyboard buffer (it tells the program the buffer is clear, so
subsequent keystrokes will be accepted normally).
Note that keystrokes are supplied before the application is run.
Load a program in high DOS memory.
LOADHIGH [drive:][path]filename [parameters]
LD [drive:][path]filename [parameters]
LH will work on a 286 or above with suitable software which
can map memory into the 640K to 1MB area.
You must have the DOS 5.x dos=umb command line in your CONFIG.SYS
file.
LOADHIGH and LH are the same command.
Display a file with forward and backward paging and scrolling.
LIST [/HSW] pathname...
/H High: Strip the high bit from each character before displaying.
/S Standard Input:Read from the standard input rather than a file.
/W Wrap: Text lines wider than the screen wrap at the right margin.
Switch a batch file to or from .BTM mode.
LOADBTM [ON | OFF]
LOADBTM switches a batch file (.BAT or .BTM) to and from .BTM mode.
If no argument is given, it displays the current LOADBTM status.
LOADBTM can only be used from within batch files.
Load a program in high DOS memory.
LOADHIGH [drive:][path]filename [parameters]
LH [drive:][path]filename [parameters]
LOADHIGH will work on a 286 or above with suitable software which
can map memory into the 640K to 1MB area.
You must have the DOS 5.x dos=umb command line in your CONFIG.SYS
file.
LOADHIGH and LH are the same command.
Save a log of commands to a disk file.
LOG [/W pathname | ON | OFF | "text"]
/W pathname Write: Specify a different filename for the log.
/W automatically enables command logging.
ON Commands are added to the log file as they are executed
with any alias or variable expansion.
OFF Commands are not added to the log file.
text Text line to add to the log (even if LOG is OFF).
LOG defaults to saving to the file NDOS.LOG in the root directory of
the boot drive.
LOG with no parameters displays the log status (ON or OFF).
Create subdirectories.
MD [drive:]path...
MKDIR [drive:]path...
path Directory to create.
MD and MKDIR are the same command.
Display the system RAM status.
MEMORY
Create subdirectories.
MD [drive:]path...
MKDIR [drive:]path...
path Directory to create.
MD and MKDIR are the same command.
Move files to other directories and drives.
MOVE [/PQR] [drive:][path]filename... [drive:][path][filename]
/P Prompt: Confirm (Y/N) each file move.
/Q Quiet: Turn off display of the files as they are moved.
/R Replace: Prompts (Y/N) before overwriting an existing file.
Tells NDOS where to search for executable and batch files not
in the current directory.
PATH [drive:]path1[;[[drive:]path2]...]
PATH [;]
When searching for an external command (.COM, .EXE, .BTM, and .BAT),
NDOS searches the current directory first, then the directories
specified in the PATH in the order listed.
PATH with no parameters displays the current search path.
PATH with just a semicolon clears the search path.
Suspend alias or batch file execution.
PAUSE [message]
message Text to display instead of the default
"Press a key when ready ..."
Change to the disk drive and directory at the top of the directory stack.
POPD [*]
* Clears the directory stack, without changing the current drive
and directory.
POPD restores the disk and directory saved using PUSHD (most recent first).
Change the NDOS command line prompt.
PROMPT [text]
text Literal text and the following special codes:
$b | (pipe) $q = (equal sign)
$c ( (open parenthesis) $s The space character
$d Current date $t Current time
$e ASCII ESC character $v MS-DOS version number
$f ) (close parenthesis) $Xd: Current disk and directory
$g > (greater-than sign) in uppercase (d: is the
$h Backspace (erase character) drive specification)
$l < (less-than sign) $xd: Current disk and directory
$n Default drive letter in lowercase (d: is the
$P Current disk and drive specification)
directory in uppercase $z Current NDOS shell nesting level
$p Current disk and $$ $ (dollar sign)
directory in lowercase $_ CR/LF (new line)
PROMPT with no parameters sets the prompt to $n$g on drives A and B,
and to $p$g and on all other drives.
Save the current disk and directory.
PUSHD [[drive:]path]
PUSHD saves the current directory on the directory stack, and if a
path is specified on the command line, changes the disk drive and
directory.
The drive and directory are restored with POPD.
Terminate the current batch file.
If you QUIT a batch file called from another batch file, you will be
returned to the previous file at the command following the original
call. To end all batch file processing, use CANCEL.
Remove one or more directories.
RD [drive:]path...
RMDIR [drive:]path...
Before removing a subdirectory, you must delete all the files and
subdirectories (and their files) in that directory (including any
hidden or read-only files).
You can use the wildcard characters (* and ?) in the directory names.
RD and RMDIR are the same command.
Place a comment in a batch file.
REM [comment]
If ECHO is ON, NDOS will echo the comment to the display when the
batch file is run (if you don't want to echo the line, preface REM
with the @ character).
Rename files or subdirectories.
REN [/PQ] [drive:][path]filename... [drive:][path]filename
RENAME [/PQ] [drive:][path]filename... [drive:][path]filename
/P Prompt: Confirm (Y/N) each rename.
/Q Quiet: Don't display filenames as they are renamed.
The last filename is the new name; preceding names are the files to
be renamed. You can use the wildcard characters (* and ?) in the
filenames.
NDOS allows you to select a target path, renaming the source file to
a new directory on the same drive.
REN will also rename directories.
REN and RENAME are the same command.
Rename files or subdirectories.
REN [/PQ] [drive:][path]filename... [drive:][path]filename
RENAME [/PQ] [drive:][path]filename... [drive:][path]filename
/P Prompt: Confirm (Y/N) each rename.
/Q Quiet: Don't display filenames as they are renamed.
The last filename is the new name; preceding names are the files to
be renamed. You can use the wildcard characters (* and ?) in the
filenames.
NDOS allows you to select a target path, renaming the source file to
a new directory on the same drive.
REN will also rename directories.
REN and RENAME are the same command.
Return from a GOSUB (subroutine) call in a batch file.
RETURN
Processing is returned to the command following the original GOSUB.
Remove one or more directories.
RD [drive:]path...
RMDIR [drive:]path...
Before removing a subdirectory, you must delete all the files and
subdirectories (and their files) in that directory (including any
hidden or read-only files).
You can use the wildcard characters (* and ?) in the directory names.
RD and RMDIR are the same command.
Position the cursor on the screen, and optionally display a
message.
SCREEN row column [message]
row Start row.
column Start column.
The row and column are zero-based. On a standard 25-line by 80-column
display, valid rows are 0 to 24 and valid columns are 0 to 79.
Display text in color.
SCRPUT row column [BRIGHT] [BLINK] fg ON bg text
row Start row.
column Start column.
fg Foreground character color.
bg Background character color.
The available colors are:
Black Blue Green Red
Magenta Cyan Yellow White
The row and column are zero-based. On a standard 25-line by 80-column
display, valid rows are 0 to 24 and valid columns are 0 to 79.
Execute a command on specified files.
SELECT [/A[:]-rhsda] [/O[:]-deinsgu] [command] (pathname...)
/A: Display filenames with specified attributes. Use /A: with no
attributes to display all filenames (including hidden and system).
r Read-only s System a Archive
h Hidden d Directory - Prefix means "not"
/O: Sort sequence, any combination of the following options:
d Date and time n Name u Unsorted (like COMMAND.COM)
e Extension s Size - Reverse the sort order
i File description g Group directories
Select command-line file parameters by marking the directory entries
using a full-screen "point-and-shoot" display.
Display, create, modify, or delete environment variables.
SET [/P][/R pathname...] [variable[=][value]]
variable Environment variable name (up to 80 characters).
value String (up to 255 characters).
/P Pause: Halt display after each screen.
/R Read: Load environment variables from a file.
SET with no parameters displays the current environment.
SET variable= with no value clears the variable from the environment.
Display or set NDOS configuration variables.
SETDOS [/An /Cx /Ex /Fn /Hn /I+|-command /Ln /Mn /Nn /Rn /Sn:n /Un /Vn]
/An ANSI: determines if NDOS attempts to use an ANSI driver (0, 1, or 2).
/Cx COMPOUND: character to separate multiple commands on the same line (^).
/Ex ESCAPE: character to suppress normal meaning of next character (Ctrl-x).
/Fn FILENAME: controls filename truncation (0 or 1).
/Hn HISTORY: determines the minimum command size to save (0 to 256).
/I+|- INTERNAL: disable or enable internal NDOS commands.
/Ln LINE: controls how NDOS gets its input from the command line (0 or 1).
/Mn MODE: controls the line editing mode (0 or 1).
/Nn NOCLOBBER: controls output redirection (0 or 1).
/Rn ROWS: the number of screen rows used by the video display.
/Sn:n SHAPE: sets the NDOS cursor shape (start:end scan lines).
/Un UPPER: case for filenames displayed by the internal commands (0 or 1).
/Vn VERBOSE: variable controls command echoing in batch files (1 or 0).
SETDOS with no parameters displays the current settings for the NDOS
configuration variables.
Save a copy of the current disk drive, directory, environment
variables, and aliases.
SETLOCAL
Restore with ENDLOCAL.
Allow the use of more than 10 variables in a batch file.
SHIFT [n]
n %0 to %127
SHIFT is provided for compatibility with COMMAND.COM which only
supports 10 parameters (%0 to %9). NDOS supports 128 (%0 to %127).
Display, enable, or disable the NDOS swapping state.
SWAPPING [ON | OFF]
SWAPPING with no parameters displays the current NDOS swap state.
Copy standard input to standard output, and save a copy in the
specified file(s).
TEE [/A] [drive:]pathname...
/A Append: Output is appended to the file(s) rather than
overwriting it.
Display a block of text in a batch file.
ENDTEXT
Both TEXT and ENDTEXT must be entered as the only commands on the line.
Display or set the current system time.
TIME [hh:mm:ss [A|P]]
hh hour (0 to 23).
mm minute (0 to 59).
ss second (0 to 59).
A AM for 12 hour format.
P PM for 12 hour format.
TIME with no parameters, displays the current system time and prompts
you for a new time.
Only hours are required.
Turn the system stopwatch on or off.
TIMER [/S]
/S Display split times without stopping the timer.
Display the contents of the specified file(s).
TYPE [/LP] [drive:][path]filename...
/L Line: Display line numbers preceding each line of text.
/P Pause: Halt display after each screen.
NDOS will TYPE multiple files with wildcards (* and ?) in the filename.
Remove aliases from the alias list.
UNALIAS alias...
UNALIAS *
alias Alias to delete.
* Delete all aliases.
Remove variables from the environment.
UNSET varname...
UNSET *
varname Environment variable.
* Delete all environment variables.
Display the current NDOS and DOS versions.
Display, enable, or disable disk write verification.
VERIFY [ON | OFF]
ON Makes sure that each sector a file is written to can be read.
OFF Disable write verification.
VERIFY with no parameters displays the current verify state.
Display the disk volume label(s).
VOL [drive:]...
Copy standard input to standard output, and then copy the specified
file(s) to standard output.
Y pathname...
Standard input from the console is terminated by a Ctrl-Z.