TYPE

Print Topic  Return to Overview  Previous Topic  Next Topic 
Purpose:Display the contents of the specified file(s).

 

Format:TYPE [/A:[[-][+]rhsadecijopt] /I"text" /L /P] [@file] file...

 

fileThe file or list of files that you want to display.
@fileA text file containing the names of the files to display, one per line (see @file lists for details).

 

/A: (Attribute select)/L(ine numbers)
/I"text" (match description)/P(ause)

 

See also:  HEAD, TAIL, LIST.

 

File Selection

 

Supports attribute switches, extended wildcards, ranges, multiple file names, and include lists.

 

Internet: Can be used with FTP and HTTP servers, e.g.

 

type "http://jpsoft.com/notfound.htm"

 

Usage:

 

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 (.COM and .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

 

NTFS File Streams

 

TYPE supports file streams on NTFS drives. You can type an individual stream by specifying the stream name, for example:

 

type streamfile:s1

 

See NTFS File Streams for additional details.

 

Options:

 

/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.

 

/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.

 

/LDisplay a line number preceding each line of text.

 

/PPrompt after displaying each page. Your options at the prompt are explained in detail under Page and File Prompts.

 

Topic "type.htm" last edited 5/12/2008. ©2008  JP Software, Inc.
Keywords: TYPE,HEAD,TAIL