DOS Command

DOS (Disk Operating System) uses a command-line interface (CLI) to perform file, directory, and system management tasks. Below are essential DOS commands with examples.

Opening Command Prompt (CMD)

  • Press Win + R, type cmd, and press Enter.
  • Or, search for Command Prompt in the Start menu.

File & Directory Commands

CommandDescriptionExample
dirLists files & foldersdir C:\Users
cdChanges directorycd Documents
cd..Moves up one directorycd..
md or mkdirCreates a new foldermkdir NewFolder
rd or rmdirDeletes a folderrmdir OldFolder
delDeletes a filedel file.txt
copyCopies a filecopy file1.txt D:\Backup
moveMoves or renames a filemove file1.txt D:\Documents
renRenames a fileren oldname.txt newname.txt

System & Disk Commands

CommandDescriptionExample
clsClears the screencls
timeDisplays or changes system timetime
dateDisplays or changes system datedate
verShows DOS versionver
volDisplays disk volume namevol C:
chkdskChecks disk for errorschkdsk C:
formatFormats a disk driveformat D:
exitCloses command promptexit

Viewing & Editing Files

CommandDescriptionExample
typeDisplays file contentstype file.txt
editOpens a file editor (old DOS)edit file.txt
notepadOpens file in Notepadnotepad file.txt