Siksha Sarovar

Siksha Sarovar (sikshasarovar.com) is a free educational web application that helps students in India learn programming and prepare for academic and competitive exams. The platform offers structured coding courses (C, C++, Python, Java, HTML, CSS, PHP, Power BI, AI, Machine Learning, Data Science), complete university curriculum notes for BCA/MCA students with previous year question papers, Class 10 and Class 12 CBSE/HBSE school notes, and dedicated preparation material for SSC, UPSC, Banking, Railway and other government exams. Browsing the site is completely free and requires no account. Users may optionally sign in with Google solely to save their learning progress, quiz scores and personal preferences across devices.

Privacy Policy | Terms of Service | Contact Siksha Sarovar | About Siksha Sarovar

v4.0.9 · PWA
Siksha Sarovar logo
Siksha Sarovar
Your Learning Universe

Siksha Sarovar is a free e-learning platform for coding courses, BCA university notes and competitive exam preparation. Optional Google sign-in saves your learning progress across devices.

Initializing knowledge base…
Compiling modules 0%

Unit 2: DOS Commands

Lesson 20 of 34 in the free Fundamentals of IT & Computers notes on Siksha Sarovar, written by Rohit Jangra.

Unit II — DOS Commands

DOS commands are text-based instructions typed at the command prompt (C:>). They are divided into Internal Commands (built into COMMAND.COM, always available) and External Commands (separate .EXE or .COM files on disk, available only if the DOS directory is in the path).

---

Internal Commands

These commands reside in COMMAND.COM and are available immediately after DOS loads.

CommandSyntaxDescription
DIRDIR [path] [/P] [/W]Lists files and directories. /P = pause per page; /W = wide format
CDCD [path]Changes current directory. CD.. = go up one level
MDMD dirnameCreates a new directory (Make Directory)
RDRD dirnameRemoves an empty directory (Remove Directory)
COPYCOPY source destCopies files from source to destination
DELDEL filenameDeletes a file
RENREN oldname newnameRenames a file
TYPETYPE filenameDisplays contents of a text file on screen
CLSCLSClears the screen
DATEDATEDisplays or sets the system date
TIMETIMEDisplays or sets the system time
VERVERDisplays the DOS version
VOLVOLDisplays the disk volume label
PATHPATH [directories]Sets or displays the command search path
PROMPTPROMPT [text]Changes the command prompt appearance
SETSET variable=valueSets or displays environment variables
ECHOECHO messageDisplays a message; used in batch files

---

External Commands

These are separate program files (.EXE or .COM) stored in the DOS directory.

CommandDescription
FORMATFORMAT C: — Formats a disk; erases all data
DISKCOPYCopies an entire floppy disk to another
CHKDSKChecks disk for errors and reports disk/memory status
XCOPYExtended copy; can copy directories and subdirectories
ATTRIBChanges file attributes (Read-only, Hidden, Archive, System)
FDISKPartitions a hard disk
SORTSorts input data alphabetically
FINDSearches for a text string within files
MOREDisplays output one screen at a time (pipe: `DIRMORE`)
LABELCreates or changes disk volume label
TREEDisplays directory structure graphically
EDITOpens the DOS text editor
DEBUGLow-level debugging tool

---

Batch Files

A batch file (.BAT) is a text file containing a series of DOS commands that execute sequentially when the file is run.

Example batch file GREET.BAT:

@ECHO OFF
ECHO Hello, Welcome to DOS!
DATE
DIR C:```

Running `GREET` at the prompt executes all commands in sequence.

---

### Internal vs External — Quick Reference

| Feature | Internal | External |
|---|---|---|
| Location | In COMMAND.COM | Separate .EXE/.COM file on disk |
| Availability | Always available | Only if file exists on path |
| Examples | DIR, CD, COPY, DEL | FORMAT, XCOPY, CHKDSK |

> **Key Takeaway:** Internal commands (DIR, CD, COPY, DEL, CLS) are always available and are the most exam-relevant. External commands (FORMAT, CHKDSK, XCOPY) require the corresponding file. Batch files automate command sequences. Memorise at least 10 internal and 5 external commands with their syntax.