Type
Displays the contents of a text file. Use the type command to view a text file without modifying it.
Syntax
type [Drive:][Path] FileName
Parameters
[ Drive : ][ Path ] FileName : Specifies the location and name of the file or files that you want to view. Separate multiple file names with spaces.
/? : Displays help at the command prompt.
Remarks
-
If you are using an NTFS drive and FileName contains spaces, use quotation marks around the text (that is, "File Name").
-
If you display a binary file or a file created by a program, you may see strange characters on the screen, including formfeed characters and escape-sequence symbols. These characters represent control codes used in the binary file. In general, avoid using the type command to display binary files.
Examples
To display the contents of a file named Holiday.mar, type:
type holiday.mar
To display the contents of a lengthy file one screen at a time, type:
type holiday.mar | more
Formatting legend
|
Format |
Meaning |
|---|---|
|
Italic |
Information that the user must supply |
|
Bold |
Elements that the user must type exactly as shown |
|
Ellipsis (...) |
Parameter that can be repeated several times in a command line |
|
Between brackets ([]) |
Optional items |
|
Between braces ({}); choices separated by pipe (|). Example: {even|odd} |
Set of choices from which the user must choose only one |
|
Courier font |
Code or program output |
