1
0
cpm3help/cpm3/06dir.help

189 lines
5.3 KiB
Plaintext

///1DIR
The DIR command displays the names of files and the
characteristics associated with the files.
The DIR command has three distinct references:
DIR
DIRS
DIR with Options
DIR and DIRS are built-in utilities. DIR with Options is a
transient utility and must be loaded into memory from the disk.
///2Built-in
Syntax:
DIR {d:}
DIR {filespec}
DIRS {d:}
DIRS {filespec}
Explanation:
The DIR and DIRS Built-in commands display the names of files
cataloged in the directory of an on-line disk. DIR lists the
names of files in the current user number that have the Directory
(DIR) attribute. DIR accepts the * and ? wildcards in the file
specification.
///3Examples
A>DIR
Displays all files in user 0 on drive A that have the
Directory attribute.
A>DIR B:
Displays all DIR files in user 0 on drive B.
2A>DIR C:ZIPPY.DAT
Displays the name ZIPPY.DAT if the file is in user 2 on
drive C.
4A>DIR *.BAS
Displays all DIR files with filetype BAS in user 4 on drive
A.
B3>DIR X*.C?D
Displays all DIR files in user 3 on drive B whose filename
begins with the letter X, and whose three character filetype
contains the first character C and last character D.
A>DIRS
Displays all files for user 0 on drive A that have the
system (SYS) attribute.
A>DIRS *.COM
Displays all SYS files with filetype COM on drive A in user
0. A command (.COM) file in user 0 with the system
attribute can be accessed from any user number on that
drive, and from any drive in the search chain (see SETDEF).
///2withOptions
Syntax:
DIR {d:} [options]
DIR {filespec} {filespec} ... [options]
Explanation:
The DIR command with options is an enhanced version of the DIR
built-in command and displays your files in a variety of ways.
DIR can search for files on any or all drives, for any or all
user numbers. One or two letters is sufficient to identify an
option. You need not type the right hand square bracket.
///3Options
Option Function
ATT displays the file attributes.
DATE displays date and time stamps of files.
DIR displays only files that have the DIR attribute.
DRIVE=ALL displays files on all on-line drives.
DRIVE=(A,B,C,...,P)
displays files on the drives specified.
DRIVE=d displays files on the drive specified by d.
EXCLUDE displays files that DO NOT MATCH the files
specified in the command line.
FF sends an initial form feed to the printer device if
the printer has been activated by CTRL-P.
FULL shows the name, size, number of 128-byte records, and
attributes of the files. If there is a directory
label on the drive, DIR shows the password
protection mode and the time stamps. If there is no
directory label, DIR displays two file entries on a
line, omitting the password and time stamp columns.
The display is alphabetically sorted. (See SET for a
description of file attributes, directory labels,
passwords and protection modes.)
LENGTH=n displays n lines of printer output before inserting
a table heading. n is a number between 5 and 65536.
MESSAGE displays the names of drives and user numbers DIR is
searching.
NOSORT displays files in the order it finds them on the disk.
RO displays only the files that have the Read-Only
attribute.
RW displays only the files that are set to Read-Write.
SIZE displays the filename and size in kilobytes (1024
bytes).
SYS displays only the files that have the SYS attribute.
USER=ALL displays all files in all user numbers for the default
or specified drive.
USER=n displays the files in the user number specified by n.
USER=(0,1,...,15)
displays files under the user numbers specified.
///3Examples
A>DIR C: [FULL]
Displays full set of characteristics for all files in user 0
on drive C.
A>DIR C: [DATE]
Lists the files on drive C and their dates.
A>DIR D: [RW,SYS]
Displays all files in user 0 on drive D with Read-Write
and System attributes.
3A>DIR [USER=ALL, DRIVE=ALL]
Displays all the files in all user numbers (0-15) in all on-
line drives.
B6>DIR [exclude] *.DAT
Lists all the files on drive B in user 6 that do not have a
filetype of .DAT.
3B>DIR [SIZE] *.PLI *.COM *.ASM
Displays all the files of type PLI, COM, and ASM in user
3 on drive B in size display format.
A>DIR [drive=all user=all] TESTFILE.BOB
DIR displays the filename TESTFILE.BOB if it is found on
any drive in any user number.
A>DIR [size,rw] D:
DIR lists each Read-Write file that resides on Drive D,
with its size in kilobytes. Note that D: is equivalent to
D:*.*.