Find the Best Cosmetic Hospitals

Explore trusted cosmetic hospitals and make a confident choice for your transformation.

“Invest in yourself — your confidence is always worth it.”

Explore Cosmetic Hospitals

Start your journey today — compare options in one place.

MS-DOS Basics: Practical Commands for Files, Directories, and Legacy Disk Tasks

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.

DOS tutorial illustration

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 formBest forNotes
DIRFull listing in current directoryShows metadata for each file
DIR /PPaged outputUseful for long listings
DIR /WCompact multi-column viewFaster visual scan, less detail
DIR filename.extFind one exact fileReturns file or not found
DIR prefix*Find files by name prefixWildcard pattern match
DIR *.extFind files by extensionExample: 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

TaskPrimary commandExampleRisk level
List filesDIRDIR /WLow
Create text fileCOPY CONCOPY CON NOTE.TXTLow
Copy fileCOPYCOPY A.TXT B.TXTLow
Rename file(s)RENREN *.TXT *.BAKMedium
Delete file(s)DELDEL *.TMPHigh
Remove directoryRDRD \INFOHigh
Format diskFORMATFORMAT 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.

Find Trusted Cardiac Hospitals

Compare heart hospitals by city and services — all in one place.

Explore Hospitals
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.

Related Posts

4 Open Source Alternatives to Slack for Team Chat: IRC, Let’s Chat, Mattermost, and Rocket.Chat

If you want Slack-like team communication with more control, these four open source options are a practical starting point. This guide compares their strengths, trade-offs, and how to run a short technical pilot.

Read More

jstack Utility Deep Dive: JVM Thread Dumps, Deadlocks, and Mixed Stacks

This guide explains how to use jstack to diagnose JVM hangs and deadlocks, including forced dumps, core-file analysis, and mixed Java/native stack traces. It also clarifies where jcmd fits in modern JDK 8+ troubleshooting guidance.

Read More

Open Source Scanning Software: Evaluate Legacy Tools and Build a Modern SCA Workflow

The original post listed several tool names but no implementation guidance. This revised guide explains what open source scanning means in DevSecOps, how to interpret those legacy names, and how to implement a practical CI scanning workflow.

Read More

Lyca Mobile USSD Shortcuts: Check Balance and Data Balance Quickly

Use these Lyca Mobile USSD shortcuts to check your prepaid balance and remaining data in seconds. This updated reference includes quick steps, a workflow diagram, and troubleshooting guidance.

Read More

Single Sign-On Implementations: Practical Comparison and Evaluation Guide

This guide expands a short 2015 link list of SSO tools into a practical DevOps reference. You will learn how SSO flows work, how to compare implementations, and how to validate integrations with real commands.

Read More
Subscribe
Notify of
guest
1 Comment
Newest
Oldest Most Voted
Jason Mitchell
Jason Mitchell
11 months ago

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!

1
0
Would love your thoughts, please comment.x
()
x