|Purpose:||Display the contents of the specified file(s)|
|Format:||TYPE [/= /A:[[-][+]rhsadecijopt] /B /I"text" /L /O:[-]acdeginorstuz /P /X /XS] [@file] file...|
|file||The file or list of files that you want to display.|
|@file||A text file containing the names of the files to display, one per line (see @file lists for details).|
Supports command dialog, attribute switches, extended wildcards, ranges, multiple file names, and include lists.
Internet: Can be used with FTP and HTTP servers, e.g.
The TYPE command displays a file. It is normally only useful for displaying text files (i.e. alphanumeric characters arranged in lines separated by CR/LF). Most text files use either ASCII or Unicode.
Executable files (.EXE ) and many data files may be unreadable when displayed with TYPE because they include non-alphanumeric characters or unusual line separators.
To display the files MEMO1 and MEMO2:
type /p memo1 memo2
You can press Ctrl-S to pause TYPE's display and then any key to continue.
To display text from the clipboard use CLIP: as the file name. CLIP: will not return any data if the clipboard does not contain text. See Redirection for more information on CLIP:.
You will probably find LIST to be more useful for displaying files on the screen. The TYPE /L command used with redirection is useful if you want to add line numbers to a file, for example:
type /l myfile > myfile.num
If you don't enter any arguments, TYPE will display its command dialog.
TYPE sets two internal variables:
|%_type_files||The number of files displayed|
|%_type_errors||The number of errors|
TYPE will recognize Unicode (UTF-16) files based on either a BOM or specific UTF-16 sequences at the beginning of the file. TYPE will recognize UTF-8 files based on either a BOM or UTF-8 extended characters within the first 2K of the file.
•NTFS File Streams
TYPE supports file streams on NTFS drives. You can type an individual stream by specifying the stream name, for example:
See NTFS File Streams for additional details.
|/=||Display the TYPE command dialog to help you set the command line options. The /= option can be anywhere on the line; additional options will set the appropriate fields in the command dialog.|
|/A:||Select only those files that have the specified attribute(s) set. See Attribute Switches for information on the attributes which can follow /A:. Do not use /A: with @file lists. See @file lists for details.|
You can specify /A:= to display a dialog to help you set individual attributes.
|/I"text"||Select files by matching text in their descriptions. The text can include wildcards and extended wildcards. The search text must be enclosed in double quotes, and must follow the /I immediately, with no intervening spaces. You can select all filenames that have a description with /I"[?]*", or all filenames that do not have a description with /I"". Do not use /I with @file lists. See @file lists for details.|
You may use any combination of the sorting options below. If multiple options are used, the listing will be sorted with the first sort option as the primary key, the next as the secondary key, and so on:
|n||Sort by filename and extension, unless e is explicitly included.|
|-||Reverse the sort order for the next sort key|
|a||Sort names and extensions in standard ASCII order, instead of numerically when numeric substrings are included in the name or extension.|
|c||Sort by compression ratio|
|d||Sort by date and time (oldest first); also see /T:acw|
|e||Sort by extension|
|g||Group subdirectories first, then files|
|i||Sort by description|
|o||Sort by owner|
|r||Reverse the sort order for all options|
|s||Sort by size|
|t||Same as d|
|z||Same as s|
|/P||Prompt after displaying each page. Your options at the prompt are explained in detail under Page and File Prompts.|