Command Descriptions
Advanced User’s Guide
B-13
/O
The
/O
option causes the filenames to be displayed in sorted order. The sort
order can contain one or more of the following letters:
-
The dash (
-
) symbol can precede the sort option to reverse the sort order. For
example, to sort all files in the directory in reverse alphabetic order, use the
/
O-N
option.
/S
The
/S
option causes the display to include files in subdirectories also.
/W
Display list in a wide format without date, time, or size.
The
DIRCMD
environment variable can be used to set the default preferences
for the
DIR
command. The
SET
command will assign the values to an
environment variable. Refer to the
SET
command section for proper usage. For
example, to always have the
/P
option set for DIR, the statement
SET
DIRCMD=/P
could be used. The default settings in
DIRCMD
can be
overridden by using the minus sign (
-
) preceding the option. To cancel the
paging for a single use of the
DIR
command, enter
DIR /-P
.
Examples
To see the directory entries of all files in the current drive and directory, type:
DIR
To see all files in the subdirectory MEMOS on drive
B
, type:
DIR B:\MEMOS
Display all files sorted by file name order.
DIR /ON
Letter
Description
D
By date and time newest first
E
Alphabetic order by extension
G
Directories grouped before files
N
Alphabetic order by name
S
Size, smallest first
advuser.book Page 13 Friday, September 27, 2002 4:22 PM