To Temple College Class  logo R. Craig Collins > ITSC 1305 > DOS Commands

DOS Commands © R. Craig Collins, 2004/6

See also Terms/Big Picture

Directories and Files
Path [drive:\][directory\]filename.ext (8.3)
Directory (Folder) Commands
List contents dir
Show structure tree /f
Change directory focus (open another folder) cd foldername
Make a new directory md foldername
Remove an empty directory rd foldername
Delete directories, subdirectories, and files deltree foldername
File Commands
Copy files copy source destination
  »Example copy a:\test.txt a:\class\test.txt
  »Example, destination renamed copy a:\test.txt a:\class\test.ltr
  »Example, copy all text (.txt) files, regardless of file name copy a:\*.txt a:\class\*.txt
  »Example, copy all files named homework, regardless of extension copy a:\homework.* a:\class\homework.*
  »Example, copy all files copy a:\*.* a:\class\*.*
  »Example, create a text file copy con filename.ext
Copy files and folders xcopy source destination /e
  »Example, copy all files, folders, and subdirectories xcopy a:\*.* c:\backup\*.* /e
Copy a diskette diskcopy source destination
  »Example diskcopy a: a:
Move a file to a different folder move source destination
Delete a file del filename.ext
Undelete a file undelete filename.ext
Set an attribute of a file attrib action (±) target file
  »Example attrib +h a:\class\test.txt
Rename a file ren oldname (no path)newname
View or change attributes attrib [+][-]|[r][a][s][h]target
Batch Files
set the Prompt prompt $p$g
set the Path to DOS path c:\DOS
insert a comment rem note to me
wait to continue pause
display @echo off nothing displays
display echo off nothing displays after this
display echo on next actions will display
display echo this displays "this displays"
Utilities
arrange files to a faster loading, contigious state defrag
check for and repair, errors chkdsk or scandisk
copies information for safekeeping backup

Glossary

BIOS

Bit

Boot

Byte

CPU

Disk

Giga...

Hardware

Hertz

Input

Kilo...

Mega...

Monitor

Output

Peripheral

RAM

ROM

Software

Definitions for these terms, and others, are on the Terms/Big Picture web page