You are on page 1of 7

Define any five file

management commands of
DOS-

Copy con – This command is used


to create a new file.
Syntax- Copy con <file name>
eg. C:\> Copy con Students
……………….
……………… F6/Ctrl + Z

Type – This command is used to


see the contents of a file.
Syntax – Type <File name>

C:\> Type Students

Del/Erase – These commands are


used to delete any file.
Syntax – Del / Erase <File name>
[/P]

C:\> Del Students


C:\> Del Physics /P
Delete Physics Yes/No ?

Ren/Rename – These command


are used to change the name of a
file
Syntax- Ren/ Rename <Old file
name> <New file name>
C:\> Ren Students Batch326

Copy – This command is used to


copy a file from one location to
another.
Syntax – Copy <source>
<target>
C:\>Copy C:\Science\Physics
C:\Jun20

Move – External – Move.Exe


This command is used to transfer
a file from one location to
another.
Syntax – Move <Source >
<Target>

C:\> Move C:\Science\Che


C:\Ankit

Define Xcopy command of DOS


Xcopy – External Xcopy.exe
This command is used to copy
files as well as directories
Syntax – Xcopy <source>
<target> [/S][/E]
Xcopy C:\science
D:\Backup /S
Xcopy C:\science
D:\Backup /E
/S – this options copies
subdirectories also
/E – this option copies those sub
directories also which are empty
Differences between Copy and
Xcopy –
1. Copy command copies files
only while xcopy command
copies files as well as
directories
2. Copy is internal command
while Xcopy is external
command
3. Xcopy works faster than copy
command
Define any five disk management
commands of DOS-
Ans -
1) CHKDSK
2) SCANDISK
3) FORMAT
4) UNFORMAT
5) FDISK
CHKDSK – External, Chkdsk.exe
This command is used to check a
disk for errors.
Syntax - CHKDSK <Drive>

CHKDSK C:

SCANDISK – External,
Scandisk.exe
This command is used to check a
disk for errors and to fix those
errors.
Syntax- SCANDISK <Drive>
[/Autofix]

Scandisk C:
Scandisk C: /Autofix

Format – External, Format.com


This command is used to format a
disk. It creates new track, sector
and file allocation table (FAT) in a
disk.
Syntax – Format <Drive name>
[/Q] [/U] [/S]

Unformat – External,
Unformat.exe
This command is used to get back
deleted file folders from a
accidently formatted disk.
Syntax – Unformat <drive name>

Fdisk – External – Fdisk.exe


This command is used to create
logical partitions in a disk.
Syntax - Fdisk

You might also like