Displaying the Contents of a File - the TYPE Command

If a file PAYROLL.DAT exists in the current directory of your hard disk and you want to see its contents on the VDU, the command to do so is

C>TYPE PAYROLL.DAT <Enter>

You can also specify a path to DOS with the TYPE command. If the same file PAYROLL.DAT existed in the directory PAYMENT of the hard disk, the following command can be issued to display its contents:

C>TYPE C:\PAYMENT\PAYROLL.DAT <Enter>

If the file PAYROLL.DAT exists in the root directory of the A drive and you wished to display its contents, you have to specify the drive name before the file name. The command to do that is

C>TYPE A:PAYROLL.DAT <Enter>

Note: The Type command is useful for viewing text files.