MERI College of Engineering and Technology: Practical Lab File On "MS-DOS"
MERI College of Engineering and Technology: Practical Lab File On "MS-DOS"
MERI College
Of
Engineering and Technology
MS-DOS
MS-DOS stands for Microsoft Disk Operating system.
It is product of Microsoft company the latest version of MS-Dos was MS-Dos – 6.22 but in this time the version of MS-
Dos depend on windows. So windows is much popular operating system.
B:\>
CD- E:\>
{\> - Prompt}
Booting:- The process which load all types of programme successfully in computer is called booting. Needs for
booting file:- IO. Sys
MS-Dos.com
Command .com
Command:- The instruction which is given to computer for do specified work is called command.
b) External command
a. Internal command:- The command which id part of command.com and for execution or run no
need extra file. Ex- Date, time, vol, verson………
b) External command:- The command which is not part of command.com for execution it needs extra
file. Ex- edit, find………
3
Dos prompt:-
C:\>
C- drive
: - colon
\ - slash
> - greater than sign
Some Commands
1. DATE:- This command is used to display currently system date and day and also ask enter new date.
Syntax:- Date
2. TIME:- This command is used to display currently system time and also ask enter new time. Syntax:- Time i.g
C:\> time
3. VER:- This command is used to display the version of loaded operating system. Syntax:- VER
i.g. C:\> ver
4. VOL:- This command is used to display the volume no. of computer and disk.
Syntax:- vol
5. LABEL:- It is an external command which is used to change the name of volume label.
Syntax:- label
6. CLS:- This command is used to clear the screen of computer and move prompt on left top corner. Syntax:- cls
i.g. C:\> cls
8. COPY CON:- This command is used to create a file in desired directory and drive. Syntax:- copy con
[drive][path]<file name> i.g. copy con ram
Rule for file name:-
A. File name must be unique
B. File name can be divide into two part
a) Primary name- 8 character(first name)
b) Secondary name- 3 character (extension name)
C. Only one dot (.) can be used in file name between primary and secondary name.
D. No any blank space, no any symbol will be accepted.
C:\> D:
D:\>
9. TYPE:- This command is used to display the message or contains of file which can be in any directory.
Syntax:- Type [drive][path]<file name>
10. DIR:- This command is used to display the list of files and directory. Syntax:- Dir <directory name> i.g. D:\>
Dir
*To display the list of files and directory page wise
Dir/p*
11. DEL:- This command is used to delete the file. Syntax:- Del [drive][path]<file name> i.g. D:\> del Atish
kumar.txt
12. COPY:- This command is used to the copy desired file trun one location to another. Syntax:- Copy
[drive][path]<source> [drive][path]<target> i.g. D:\> copy Atish kumar
13.REN (RENAME):- This command is used to change the name of file in new name. Syntax:- Ren [drive][path]<file
name as on old> <new file name> i.g. D:\> Ren Atish kumar D:\> Type Atish
13. MD (MAKE DIRECTORY):- This command is used to create directory. Syntax:- MD [drive][path]<directory
name> i.g. MD Atish kumar
14. CD (CHANGE DIRECTORY):- This command is used to change the directory. Syntax:- CD <directory name> i.g.
D:\> CD Atish
D:\>Atish> CD…
D:\>
5
Example: -
Atish
kumar
gaurav tushar
Niche.
D:\Atish> CD…
15. RD (REMOVE DIRECTORY):- This command is used to remove empty directory. Syntax:- D:\> RD
[drive][path]<directory name> i.g. D:\> RD kiss\boy
D:\> RD kiss\girl
D:\> RD kiss
16. DELTREE:- It is an external command which is used to delete complete structure of directory after
conformation.
Syntax:- Deltree [drive][path]<directory name> i.g. D:\> Deltree kiss (are
you sure to delete y/n) ? Y
17. MOVE:- It is an external command which is used to move or transfer files from one location to another.
Syntax:- Move [drive][path]<source> [drive][path]<target> i.g. Move kiss\boy\rani\kiss1.c
kiss\boy\priti
18. XCOPY:- It is an external command which is used to copy complete structure of directory.
Syntax:- Xcopy [drive][path]<directory or source name> [drive][path]<target>
b) /E:- This option copy all files and directory with empty directory.
6
19. PROMPT:- This command is used to change the style of prompt. Syntax:- D:\> prompt $<exp-c>
i.g. = prompt $L
<
i.g. <prompt $G
>
i.g. ; prompt $D
Wed 05-18-05
11:30:15.40
AISECT
7
D:\>
D:\
20. SORT:- It is an external command which is used to arrange the conents of file in desired manner. It means
ascending order and descending order.
Syntax:- Sort < <file name>
EX:-
gaurav
tushar
dhanraj
To Z
Find:- It is an external command which is used to find given string (word) in desired file.
Syntax:- Find “string” <file name> i.g. D:\> Find “is” Atish kumar
22. EDIT:- It is an external command which is used to modification or editing in existed file. Syntax:- Edit <file
name>
24. FILE + NEW OR (ALT+F+N):- This command is used to create new blank file.
25. FILE + SAVE OR (ALT+F+S):- This command is used to save currently active file.
Req step:-
26. FILE + OPEN OR (ALT+F+O):- This command is used to open already existed file.
Req step:-
28. FILE + CLOSE OR (ALT+F+C):- This command is used to close currently active file.
29. FILE + PRINT OR (ALT+F+P):- This command is used to print the message of file.
30. FILE + EXIT OR (ALT+F+X):- This command is used to exit or quit from edit environment and move on dos
prompt.
31. EDIT + CUT OR (CTRL+X):- This command is used to cut the selected string and store in clipboard (Temporary
storage area).
9
Req step:-
32. EDIT + PASTE OR (CTRL+V):- To paste the string at desired position from clipboard.
Req step:-
33. EDIT + COPY OR (CTRL+C):- This command is used to copy the selected string and store in clipboard.
Req step:-
a) Select message
b) Give edit + copy command.
34. EDIT + CLEAR OR (DELETE):- To clear or delete selected string from file.
Req step:-
a) Select message
b) Press delete key
35. SEARCH + FIND OR (ALT+S+F):- This command is used to search given string in active file.
Req step:-
36. SEARCH + REPEAT LAST COMMAND OR (F3):- This command is used to repeat last command
37. SEARCH + REPLACE OR (ALT+S+R):- This command is used to replace finded string into given string.
Req step:-
38. VIEW + SPLIT WINDOW OR (ALT+V+S):- This command is used to split active window in two equal part.
39. VIEW + SIZE WINDOW OR (ALT+V+I):- This command is used to split active window in desired size.
Req step:-
40. VIEW + CLOSE WINDOW OR (ALT+V+C):- This command is used to close splited window.
41. OPTION + SETTING OR (ALT+O+S):- This command is used to setting tab key.
Req step:-
42. OPTION + COLOUR OR (ALT+O+S):- This command is used to change the colour of back ground and fore ground.
Req step:-
b) /W:- It display the list of files and directory width wise and in 5 columns. i.g. Dir/W
i.g. Dir/B/P
t) /S:- This option is used to search specified directory or files in active location. Syntax:- Dir/S <name> i.g.
Dir/S/P Ramu
1. DOSKEY:- It is an external command which is used to store command line in buffer (Temporary storage area).
It is used to develop or create short cut command.
Syntax:- Doskey
EX:-
D:\> Date
D:\> Doskey/History
3. F8 OR AEROKEY:- This key is used to call desired command from buffer. i.g. D:\> Ver
4. ALT + F7 OR D:\> DOSKEY%REINSTALL:- This key is used to remove previous command from buffer and reinstall.
5. MACROS:-
Syntax:- Doskey <veriable>=command i.g. D:\> Doskey T= Time
D:\> T
D:\> D
D:\> C Radha
1. BATCH FILE:- It is a programme file. Which holds executable command for execute one by one.
Time
Vol
Ver
………..
14
D:\> Time
@ Date
@ Time
@ Vol
@ Ver
D:\> Rahul
@ Echo off
Date
Time
Echo on
Vol
Ver
D:\> Geeta
Date
Time
Rem Aisect
Vol
Ver
D:\> Swati
Dir
Pause
Cls
Pause
Ver
D:\> Prem
Copy con %1
@ Echo off
If %1= = D Date
If %1= = T Time
If %1= = V Vol
@ Echo off
Copy con %1
D:\> RK SN
@echo off
If %1= = D goto ab
16
If %1= = V goto ac
If %1= = S goto ad
: ab
Date
Time
Goto E
: ac
Vol
Ver
Goto E
: ad
Dir
Label :E
D:\> RT D
…………
D:\> RT V
…………
D:\> RT S
10. CHOICE:- It is used to accept desired number and store it within a veriable.
Syntax:- Choice C:<message>
:ab
Date
Goto E
:ac
Time
Goto E
:bc
Vol
Goto E
:ab
Ver :E
D:\>Pooja
1. date
2. time
3. vol 4. ver
[1234]?1
D:\>
i.g. Scandisk/surface
i.g. Scandisk/checkonly
2. /AUTOFIX:- It checks specify disk and if there will be any error than fix. Syntax:- C:\> Scandisk/Autofix <drive
name>
3. SYS:- It is an external command which is used to copy all system file in desired disk.
Syntax:- Sys <disk name>
*To reboot the system after copying system file press Ctrl + Alt + Del*
(Format. exe)
4. FORMAT:- It is an external command which is used to create different sector and part in active disk.
Note:- It means it will remove previous data files and system files and system files from disk.
6. MEM:- It is an external command. Which is used to display the memory status of disk. Syntax:- C:\> Mem
7. FORMAT:- It is an external. Which is used to check new track and sector in specified disk. It also remove all also
data of specified disk. Syntax:- Format <drive name>
a) /U:- This option is used to unconditional formatting of specified disk. Syntax:- Format/U <drive name>
b) /S:- This option is used to format specified disk and transfer system file in another disk.
Syntax:- Format/S <Target disk name> i.g. Format/S A:
d) /V:- This option is used to with format command to specified volume label. Ex:- Format A:/V: Ramu
8. DISKCOPY:- This command is used to copy complete message of specified disk in another disk.
Both disk capacity will be same.
9. DISKCOMP:- This command is used to compeare two disk and display difference between then.
Syntax:- Diskcomp <Drive1> <Drive2>
10. CHKDSK:- This command is used to check states of specified disk and display details of disk.
Syntax:- Chkdsk <drive name> i.g. Chkdsk C:
11. PKZIP:- This is data comprocessing programme is used to comprocessed data file.
Syntax:- Pkzip[drive][path]<target><file name>
[Drive][Path]<Source><file name>
12. PKUNZIP:- This is data uncomprocessing programme. Which is compressed by pkzip command.
Syntax:- Pkunzip[drive][path]<file> i.g. Pkunzip C:\ Raj
.
20
--The End--