This guide modernizes a classic MS-DOS tutorial for engineers who need reliable command-line fundamentals in legacy systems, recovery environments, or DOS-style Windows command shells. You will learn core commands for navigation, file handling, directory management, cleanup, and floppy-era media operations.
Originally published on 2009-01-29; fully revised and updated.
Original compilation credit: Lisa Lemieux, UC Call Center. Source post: DOS TUTORIAL : THE BASICS.

What this guide covers
MS-DOS is a command-line operating environment where you interact with files and disks through text commands. This tutorial focuses on practical day-to-day operations: listing files, filtering output, creating and copying files, moving across directories, deleting safely, and handling floppy disk commands used in older systems.
Before you start: environment and safety
Use a non-production machine or a disposable directory. Many commands below can permanently remove data. DOS commands are generally case-insensitive.
- Confirm which drive and directory you are in before running destructive commands.
- Use DIR before and after copy/delete operations to verify results.
- Avoid wildcard deletes until you have tested your file pattern.
- If command-history keys do not work, your shell setup may differ.
C:
CD \
PROMPT $P$G
DATE
TIME
CLSCode language: PHP (php)
MS-DOS workflow at a glance
flowchart TD
A[Start in C drive] --> B[Check date and time]
B --> C[List files with DIR]
C --> D{Need specific files}
D -- Yes --> E[Filter with wildcard pattern]
D -- No --> F[Open or copy file]
E --> F
F --> G[Organize into directory]
G --> H[Verify results with DIR]
H --> I[Optional cleanup with DEL or RD]
List and find files with DIR
DIR is your primary discovery command. It shows file names, extensions, sizes, and timestamps, and it supports filtering with wildcards.
DIR
DIR /P
DIR /W
DIR FORMAT.COM
DIR C*
DIR *.BAT
DIR \*.SYS
DIR > PRN
| DIR form | Best for | Notes |
|---|---|---|
| DIR | Full listing in current directory | Shows metadata for each file |
| DIR /P | Paged output | Useful for long listings |
| DIR /W | Compact multi-column view | Faster visual scan, less detail |
| DIR filename.ext | Find one exact file | Returns file or not found |
| DIR prefix* | Find files by name prefix | Wildcard pattern match |
| DIR *.ext | Find files by extension | Example: batch or system files |
Create, view, copy, and rename files
These are core file lifecycle commands in classic DOS. In older DOS conventions, filenames often follow the 8.3 format (up to 8-character name plus 3-character extension).
COPY CON QUICK.LTR
Bob
Sales are up 15%.
Good Job!
Craig
Ctrl+Z
TYPE QUICK.LTR
COPY QUICK.LTR QUICK2.LTR
COPY QUICK.LTR QUICK.BAC
REN QUICK2.LTR SALES.LTR
REN *.LTR *.BOBCode language: CSS (css)
Work with directories and paths
Use MD to create directories and CD to move through them. Use absolute paths when you want predictable behavior from any location.
MD \INFO
CD \INFO
CD
PROMPT $P$G
DIR
CD ..
COPY SALES.BOB \INFO
COPY QUICK.* \INFO
DIR \INFO
DIR \Code language: PHP (php)
Delete files and remove directories safely
Deletion is immediate in classic DOS. Validate your location and wildcard pattern first. A directory must be empty before RD can remove it.
DEL SALES.BOB
DEL QUICK.*
CD \INFO
DEL *.*
CD \
RD \INFOCode language: CSS (css)
Critical safety rule: do not run wildcard deletion in the wrong location. Always confirm with DIR first.
Floppy disk commands (legacy systems)
These commands apply to older systems that expose floppy drives as A: and B:. Use with caution: formatting and disk copy operations affect entire media.
FORMAT A:
A:
DIR
C:
DISKCOPY A: A:
DISKCOPY A: B:
COPY REPORT.TXT A:\Code language: CSS (css)
Command comparison quick reference
| Task | Primary command | Example | Risk level |
|---|---|---|---|
| List files | DIR | DIR /W | Low |
| Create text file | COPY CON | COPY CON NOTE.TXT | Low |
| Copy file | COPY | COPY A.TXT B.TXT | Low |
| Rename file(s) | REN | REN *.TXT *.BAK | Medium |
| Delete file(s) | DEL | DEL *.TMP | High |
| Remove directory | RD | RD \INFO | High |
| Format disk | FORMAT | FORMAT A: | Very high |
Practice session in a safe sandbox
C:
MD \DOSLAB
CD \DOSLAB
COPY CON NOTE.TXT
This is a test file.
Ctrl+Z
DIR
MD INFO
COPY NOTE.TXT INFO
DIR INFO
DEL NOTE.TXT
DEL INFO\NOTE.TXT
RD INFO
CD \
RD DOSLABCode language: CSS (css)
Common pitfalls and best practices
- Always confirm drive and path before DEL, RD, or FORMAT.
- Use wildcards carefully; test with DIR pattern first.
- Treat printer redirection (PRN) and floppy commands as hardware-dependent legacy features.
- If command recall keys differ from expectations, verify shell/version behavior.
- Keep backups before bulk rename or delete operations.
I’m Rajesh Kumar, a DevOps, SRE, DevSecOps, Cloud, and Platform Engineering expert passionate about sharing practical knowledge, real-world experiences, and industry best practices. I have worked at Cotocus and regularly write about technology, travel, investing, health, product reviews, and digital marketing through my various platforms.
I publish technical articles at DevOps School, travel stories at Holiday Landmark, stock market insights at Stocks Mantra, health and fitness guidance at My Medic Plus, product reviews at TrueReviewNow, and SEO and digital marketing strategies at Wizbrand.
Find Trusted Cardiac Hospitals
Compare heart hospitals by city and services — all in one place.
Explore Hospitals
Really enjoyed this throwback — you explained the DOS basics in such a simple, friendly way that it actually made me nostalgic. It’s cool how you made an old-school topic feel super approachable. Great little guide!