Nowadays Disk Operating System is not used in computer. Disk Operating System has been replaced by GUI based operating system. But still GUI based operating system provides facilities of MS-DOS commands. There are some programs they are still based on CLI.
To get the DOS environment i.e. Command prompt in the computer having operating system like Windows 98 or Windows XP, follows these steps.
- Click on start menu.
- Point to all programs, Accessories.
- Click command prompt option.
You can also get DOS prompt (Command Prompt) where you follow these steps.
- Click on start button.
- Click on Run command. It open Run dialog box.
- Type command in the text box if OS is Window 98.
- Type cmd in the text box if OS is Windows XP.
MS-DOS Commands
There are many DOS commands but you will learn very few DOS commands. Every DOS command has its syntax that tells how to write a command in proper order.
1. DIR Command
This command lists all the files and sub-directories of a drive or a directory.
Syntax:
DIR [Drive:][path][filename][/P][/S][/A][:] [Attributes][/O]
Where,
[drive:][path][filename] -------- Specifies drive, directory and files to list.
/P ----------------------------------- Pauses after the each screen full display.
/S ----------------------------------- Displays contents of subdirectories.
/O ----------------------------------- List files in sorted order.
The sorted orders are:
D ------------------------------------ by date and time
E ------------------------------------ by extension
N ------------------------------------ by name
S ------------------------------------ by file size
/A ----------------------------------- Display files with specified attributes.
The attributes are:
D ----------------------------------- Directories
R ----------------------------------- Read only files
H ----------------------------------- Hidden files
S ----------------------------------- System files
Examples:
C:\> DIR
This command lists all the files and directories in the drive C:.
C:\> DIR C:\Documents and Settings
This command lists all the files and directories of Documents and Setting directory.
C:\> DIR QBASIC
This command lists all the files and directories of QBASIC directory.
C:\> DIR/P
This command lists files of drive C pausing after a screenful display.
C:\> WINDOWS>DIR SYSTM\*.INI
Displays files having .INI extension of SYSTEM subdirectory of WINDOWS directory of drive C:
Note:
- A root directory is the initial directory or main directory. The disk drive is indicated as C: or D: which is called root directory.
- Asterisk (*) and question mark (?) are known as wild cards in MS-DOS.
- The asterisk (*) represents one or more characters in a file whereas question mark represents only one character in a file.
2. CD or CHDIR command
This command changes directory from one directory to another.
Syntax:
CD [drive:]
0 comments:
Post a Comment