You are on page 1of 8

MS-DOS

Dir - this commands shows the


list of files and directories
present on a computer.
Syntax- Dir <path>
[/P][/W][/AH][/AS][/AR] [/ON]
[/OS] [/OD]
DIR commands shows name of
file, their type, size, date and
time
C:\> DIR
C:\> DIR /P
C:\> DIR /W
/P – shows page wise list of file
/W – shows width wise list of
file
/AH – shows list of hidden files
/AS – shows list of system files
/AR – shows list of read only
file

C:\> DIR /ON


C:\> DIR /OE
C:\>DIR /OS
C:\> DIR /OD
C:\> DIR /O-N
C:\>DIR /O-E
C:\> DIR /O-S
C:\> DIR /O-D

/ON – shows list of files in


ascending order of their name
/OS – shows list of files in
ascending order of their size
/OD – shows list of files in
ascending order of their date
/OE – shows list of files in
ascending order of their type

Put minus sign after /O to see


the list of files in descending
order
DIR /O-N
DIR /O-S
DIR /O-E
DIR /O-D

DISKCOPY [External,
Diskcopy.exe] – This command
copies all files and folders of a
floppy disk into another disk.
Syntax- Diskcopy
<source> <target>
It always previous erases the
contents of target disk
C:\> DISKCOPY A: B:
WHILE USING DISKCOPY
COMMAND BOTH SOURCE AND
TRAGET DISK MUST BE OF
SAME SIZE

DISKCOMP – [External,
Diskcomp.exe] – This command
is used to compare the
contents of two floppy disks.
Syntax- Diskcomp <disk1>
<disk2>

FC- [External, FC.Com] – this


command is used to compare
the contents of two files.
Syntax- FC <File1>
<File2>
FC IMPREPORT
NEWREPORT

Attrib – [External, Attrib.exe] –


this command is used to
change the attribute of any file.
Syntax- Attrib [+/-] <code>
<File name>
Attrib +H Story
DIR
Attrib –H Story
DIR
Attrib +R Book
DIR /AR
Attrib –R Book
TREE – [External, Tree.Com] –
this command is used to see
directory structure.
Syntax- Tree <Directory
name]

DELTREE [ External,
Deltree.Exe] – this command is
used to delete any file or
directory.
Syntax- Deltree <Directory
name>

TREE C:\DOCUMENT /F
DELTREE C:\DOCUMENT

DIR, DISKCOPY, DISKCOMP,


FC, ATTRIB, TREE, DELTREE
Differences between Del and
Deltree –
1. Del command erases files
only while Deltree erases
files as well as directories
2. Del is an internal command
while Deltree is external
command

MEM- [External, Mem.Exe] –


this command gives
information about primary
memory of computer. It shows
the size of RAM, total space
used and total free space
available.
Syntax- Mem

You might also like