Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

help

List commands (only in DOS versions 5 or later).

help command See help for the DOS command. command /? List switches for the DOS command. Specify in which directories DOS searches for commands or programs.

path=c:\windows ; c:\dos prompt $p$g dir

Make the DOS prompt display the current directory.

List files in the current directory in one column.

dir /w List files in five columns. dir /p List files one page at a time. List all files with an .ext extension.

dir *.ext

dir z???.ext List files with .ext extensions that have four letters and start with z (where z is a character of your choice). dir file.ext /s Search for the file.ext in the current directory and all subdirectories under the current directory; most useful if the current directory is the root (i.e., C:\ ). type file.ext edit file.ext a: View the contents of the text file file.ext. Use the DOS editor to edit the file file.ext.

Change to the a: drive. Make a new subdirectory named diry in the c:\ directory. Change to subdirectory diry. Remove the existing subdirectory named diry. Delete a file named file.ext. Rename file file1 to file2.

md c:\diry cd c:\diry rd c:\diry del file.ext ren file1 file2

copy file1 file2 Copy file file1 to file2. verify on verify off Turn on verification of copy commands. Turn off verification of copy commands. Copy all files and subdirectories in directory diry1 to diry2. Ask for confirmation of each file before copying it from diry1 to diry2.

xcopy diry1 diry2 /s xcopy diry1 diry2 /p

diskcopy a: b: diskcopy a: a: format a: format a: /s

Duplicate a disk using two floppy drives. Duplicate a disk using the same floppy drive. Format a disk in drive a: . Format a bootable disk (include system files).

backup c:\diry\*.ext a: Back up all files with the extension .ext in c:\diry\ to drive a: . backup c:\ a: /s Back up the entire c: drive to drive a: . restore a:\ c:\diry\*.ext Restore backed-up files with the extension .ext in drive a: to the c:\diry\ directory. restore a: c:\ /s Restore backed-up files and subdirectories from drive a: to c:\ . ver time date cls Check the version of DOS. Check or correct the system time. Check or correct the system date. Clear the screen.

scandisk Scan and check drive c: for errors. ScanDisk replaces chkdsk (see below) on DOS version 6.0 and above (including Windows 95). chkdsk Check disk and memory usage of the current disk. chkdsk /f Fix errors reported by chkdsk.

chkdsk file.ext Check a particular file. chkdsk a: mem Check a particular drive (in this case, a floppy in the a: drive).

Check memory usage.

You might also like