Jump to content

TYPE.COM

From Alfawiki
Adapted from the English Wikipedia article TYPE.COM, available under CC BY-SA 4.0Updated 9 August 2025
type
Company typeCommand
IndustryComputing / Command-line interface
PredecessorSCP 86-DOS
Founded1980s
ProductsFile content display command
Websitedocs.microsoft.com/en-us/windows-server/administration/windows-commands/type

In computing, the type command is utilized within several command-line interpreter environments (shells) such as COMMAND.COM, cmd.exe, 4DOS/4NT, and Windows PowerShell to output the contents of designated files directly to the computer terminal. Its equivalent command in Unix systems is .

Implementations

This command is supported across a wide range of operating systems, including those from DEC like RT-11, OS/8, RSX-11, TOPS-10, TOPS-20, and VMS. It also appears in operating systems developed by Digital Research, such as CP/M, MP/M, and FlexOS. Other platforms implementing this command include MetaComCo's TRIPOS, Heath Company's HDOS, the Amiga's AmigaDOS, multiple DOS variants like DOS, PC-MOS, and SpartaDOS X, IBM’s OS/2 and the 4690 OS, Microsoft Windows, as well as open-source projects including ReactOS and the AROS. The command is also present in embedded environments like the EFI shell and specialized systems such as SymbOS.

The type command originated with Tim Paterson's SCP 86-DOS and has been incorporated into MS-DOS starting from its initial release. It is likewise part of DR DOS 6.0. Open-source MS-DOS emulators, for example DOSBox, provide support for this command.

Within Windows PowerShell, type functions as an alias to the Cmdlet, offering comparable capabilities. Syntax and available options differ among operating systems and shell environments due to their distinct implementations.

DEC RT-11

On DEC's RT-11, the TYPE command can process up to six file specifications simultaneously, separated by commas. If a file extension is not specified, it defaults to .LST. The command supports the use of wildcards.

Syntax

TYPE[/options] filespecs
  • COPIES:n – Specifies how many times the file should be displayed
  • DELETE – Removes the file after displaying its content
  • LOG – Records the names of typed files in a log
  • NEWFILES – Outputs only files with the current system date
  • NOLOG – Prevents logging of filenames
  • QUERY – Requests confirmation before typing each file
  • WAIT – Pauses for user input before continuing

Examples

TYPE/COPIES:3 REPORT
TYPE/NEWFILES *.LST

DR CP/M, MP/M, FlexOS

In the context of Digital Research’s CP/M, the TYPE command expands tab characters and line breaks, assuming tab stops every eight columns. On FlexOS, it does not accommodate wildcard characters.

Syntax

TYPE ufn  

(ufn = unambiguous file reference)

In MP/M, a pause feature is activated by appending 'P' followed by two digits after the filename, causing a halt after displaying that number of lines.

Examples

<syntaxhighlight lang="doscon"> A>TYPE FILE.PLM A>TYPE B:X.PRN 0A>TYPE CODE.ASM P23 </syntaxhighlight>

TSL PC-MOS

The GPL-licensed TYPE command included with The Software Link’s PC-MOS/386 offers an option to present file contents in hexadecimal format.

Syntax

.TYPE filename [/h]
  • filename – Specifies the file to be displayed
  • /h – Outputs the content in hexadecimal format

Examples

<syntaxhighlight lang="doscon"> [A:\].TYPE FILE.BIN /h </syntaxhighlight>

Microsoft Windows, OS/2, ReactOS

This command accepts wildcard characters. When used on Microsoft Windows and OS/2, it shows the filenames alongside the output if multiple files are specified.

The command structure for Microsoft Windows and ReactOS is as follows:

type [Drive:][Path]FileName
  • [Drive:][Path]FileName – Indicates the file(s) location and name to be displayed. Separate multiple files with spaces.
  • /? – Provides assistance and usage details for the command.

Examples

<syntaxhighlight lang="doscon"> C:\>type "my report.txt" </syntaxhighlight>

<syntaxhighlight lang="doscon"> C:\>type *.txt </syntaxhighlight>

See also

Further reading

External links