Friday 13 June 2014

LEARNING DOS COMMANDS



SOME USEFUL DOS-COMMANDS

      DIR:- To know what kind of files exist on a media we use this command provided by dos . This command displays the directory which we want.
A directory is a table of contents of a disk . It consists of following: names of files , their sizes , the date and time of last modification .
(a.)DIR                         displays the contents of default drive.
(b.)DIR A:                     lists the files of drive A.
(c.)DIR C:                     displays the files of drive C.  
(d.)DIR D:/P                 displays the contents of drive D page by page . Firstly , first page of the directory is displayed on the screen and a message “Press any key to continue” is displayed.
(e.) DIR <filename>      displays the file whose name is specified . In the absence of the file a message “NO SUCH FILE” is displayed.
(f.)DIR*.*                    equivalent to DIR command.
(g.)DIR.*EXE              all the files that have the extension .EXE will be displayed.
(h.)DIR A*.COM         all the files beginning with A and having .COM extension are displayed.
(i.)DIR B*.BAT/P         all the files beginning with B and having .BAT extension are displayed page-wise.
(j.) DIR CD???.DAT     all the files beginning with CD and comprising 5 characters and having .DAT extension are listed.
(k.) DIR ?XY.???          all the files ending with XY and comprising 3 characters and having any extension are displayed.   

NOTE:- all the dos commands are case-insensitive
                                                                                              

No comments:

Post a Comment