Tuesday, September 18

Displaying the content of a file

TYPE
TYPE command can be used to display the content of a file.
Syntax
TYPE[drive:] [path] filename
where,
drive :  drive name where you have your file. 
path  :  location of file you want to display.
filename :  name of the file whose content is to be displayed.
You have to specify the name of the file.
You may specify the drive and directory or subdirectory name if the file is not in the current drive or directory.
Wild card characters are not allowed in the file name.
Example 1
C:\> TYPE COMPUTER (Press enter key)
It displays the content of file COMPUTER on the screen.
Since the file COMPUTER contains the paragraph typed in Example 1, so computer will display on the screen.
Example 2
If you have saved file in other drive A: as COMPUTER, you can see the content of file COMPUTER from C: drive by using the command :
C:\>TYPE A:\COMPUTER (Press enter key)
Example 3
If you want to see the content of file having extension (e.g. NEPALI.COM), you have to specify both file name and extension.
C;\>TYPE NEPALI.COM (Press enter key)
It shows you the content of file NEPALI.COM  

No comments:

Post a Comment