Assignment of DOS
Assignment of DOS
4. Write down the command to format a disk when you are present in any
other disk
C:\>format D:
This command will format D drive
5. Write down the command to display all files having common extension and
hidden.
C:\> dir *.doc /A:h
This command will display all hidden .doc files
6. Write down the command to display all non-hidden read only files and also
sort them in alphabetical order.
C:\>dir /A:r-h /O:n
7. Create a directory in D drive, enter in that directory and create a
subdirectory there.
C:\>D:
D:\>md pra
D:\>cd pra
D:\pra>md pravah
D:\pra>
Note: md stands for make directory and cd stands for change directory. pra and
pravah are the names of directories here.
8. Copy a file from subdirectory XYZ which is present in directory PQR in D
drive and copy it into E drive with a different name.
C:\> copy D:\PQR\XYZ\filename.ext E:\filename2.ext
9. What is the use of diskcopy command?
Diskcopy command is an external command which makes a copy of removable
disk (source disk) on another disk (target disk). The disk must be removable.
Syntax:
C:\>diskcopy A: D:
10. What is difference between copy and xcopy command? Explain with suitable
examples.
copy xcopy
1 It is an internal command 1 It is an external command
) )
2 It can copy files only 2 It can copy files and folders too
) )
3 While copying it cannot create 3 While copying it can create directory.
) directory )
4 It can combine two files using + 4 It cannot combine two files
) )
5 It is directly associated with target file 5 It is not directly associated with target
) ) file