Sei sulla pagina 1di 2

Most Commonly Used MS-DOS Commands

CD changes the current directory, or displays the current directory name.


Examples
cd\ goes to the highest level the root of the drive.
cd.. goes back one directory. For example if you are within the
C:\directory1\directory2> directory this would take you to C:\directory1>
cd Example If present would take you into the “Example” directory.

DIR displays the contents of the current directory.


Examples
dir lists all the files and directories for the current drive
dir/p lists all the files one page at a time
dir/w a wide listing of files for the current drive (doesn’t display date/time)

COPY copies the files specified to the specified destination directory.


Examples
copy blossom.blu a: copy a file named BLOSSOM.BLU from the current drive, to
the disk in drive A
copy *.* a: copy all the files in the directory currently in to the floppy disk
in drive A
copy file.doc c:\folder copy a file named FILE.DOC from the current drive, to the
FOLDER directory in drive C

DEL deletes the filenames you specify.


Examples
del oldnews.doc delete a file named OLDNEWS.DOC on the current drive
del c:\folder\*.* delete all files in the c:\folder directory

EDIT allows a user to view, create and or modify their computer files. To start the
Editor and load a file into memory, type edit followed by the name of the file
you want to edit.
Examples
edit c:\autoexec.bat Loads AUTOEXEC.BAT from the hard disk and allows the user
to view and modify it.
edit newfile.txt creates a new file named NEWFILE.TXT. This would bring up a
blank edit screen.

MOVE moves files or directories from one folder to another or from one drive to
another.
Examples
move c:\folderName\*.* c:\temp moves all the files of FOLDERNAME directory to
the TEMP directory

1
REN renames the file or directory you specify.
Examples
ren a:letters.doc numbers.num renames a file on the disk in drive A, changing its
name from LETTERS.DOC to NUMBERS.NUM
ren *.txt *.bak renames all text files to files with .bak extension

DELTREE deletes a directory and all the subdirectories and files in it.
Examples
deltree c:\myfiles Deletes the MYFILES directory and everything in it

CLS clears the screen, leaving the cursor at the top.


Examples
cls clears the screen

FORMAT erases all of the information off of a computer diskette or fixed drive.
Examples
format a: Erases all the contents of a disk.

MD creates a new directory with the name you specify. You can also use
MKDIR to create a new directory
Examples
md direcName creates a new directory named DIRECNAME

RD removes (deletes) the specified directory. You can also use RMDIR to
remove a directory
Examples
rd direcName removes the DIRECNAME directory

DISKCOPY copies the contents of one floppy disk to another.


Examples
diskcopy a: makes a copy of the disk that is currently in your drive

Potrebbero piacerti anche