To change the default drive, simply the drive letter is typed at the prompt. The new default will be listed subsequent DOS prompts.
Use: This command changes the current drive.
Output: The drive changes from C to A as A:/>
Syntax: DIR [drive] [switches]
Where, switches and their meanings are given below:
|/0||Displays files/directories in sorted order with following specifications|
Use: displays files, directories and sub-directory.
Output: displays list of directory page wise
Syntax: Copy Con
Use: Used to create a text file.
Example: C:\> Copy Con Nepal.txt
Now type some text
Save: Press F6 Key or Press CTRL+z
C:\>Copy Con REED.TXT
Now type some text
press F6 or (Ctrl+Z) to save it.
Use: Used to display content of a file.
Example: C:\>TYPE Nepal.txt
Output: This command display the information contained in the file name Nepal .TXT
Now you can view the content of REED.TXT
Use: This command copies file(s) from one location to another.
Example: C:\>COPY Nepal china
C:\>Copy RAMA.TXT B:
To copy Rama.txt file to drive B: working on C: drive.
C:\>Copy aa .txt + bb .txt + cc .txt +dd .txt
To merge the contents of aa.txt, bb .txt and cc.txt to a new filename dd.TXT
Use: Used to rename a file.
Example: A:\> REN nepal. Doc patan.doc
Output: This will rename the old file nepal.doc into patan.doc
To rename all the files having .com as an extension into the extension .exe with the same primary file name of drive C.
Syntax: DEL filename
Use: Used to delete file(s)
Example: C:\>DEL try.exe
Output: It deletes try.exe file from drive C.
To delete all the files having .doc as an extension of drive C:
To delete all the files starting with R having any extension of drive C:.
To delete all the files having 7 characters long starting with Comp having .TXT as an extension of drive D.
Use: This command is used to display and change system date of computer.
Output: Current date is sat 08-04-2004
Enter new date (mm-dd-yy):
Use: This command is used to change and display the current system time of the computer.
Output: Current time is 7:15:01.91
Enter new time:
Syntax: PROMPT [text or definition]
Use: This command is used to change MS-DOS prompt.
Example: C:\PROMPT $P$D$G
Output: C:\02-07-2010> is displayed prompt
|$Q||= (equal sign)|
|$$||$ (dollar sign)|
|$G||> (greater sign)|
Syntax: VOL [drive]
Use: Used to display volume label name of a disk.
Output: Volume in drive C is new Volume Serial Number is 8B9F-9BFA.
Use: Used to see the version of MS-DOS currently in use.
Example: C:\> VER
Output: Windows 98 [version 4.10.2222]
Syntax: MD< directory- name>
Use: Used to create a directory
Example: C:\>MD School
Output: A directory named "School" is created in root directory C.
Use: Used to change or get into the directory.
Example: C:\> CD School
Output: This command let us to go into directory School and we will be in C:\ School>
Use: Used to escape from working directory.
Example: C:\School>CD.. or CD\
Output: It will escape from directory School to root directory C.
Syntax: RD [directory]
Use: Used to remove directory, but the directory must be empty.
Example: C:\>RD School
Output: It removes directory School, which is in C drive.
It is an instruction computer to perform specific task and get reliable output. There are two types of command in MS-DOS. They are:
It display all the files which having first character Q in files name and extension BAS.
It copies the entire file having EXE as an extension to PALPA directory of C drive.