📂 Introduction
In Part 2, we learned how to move around folders and manage directories in MS-DOS. But a computer is not just about folders — it’s about the files inside them. In this part, we’ll cover all the essential file operation commands. These commands let you copy, rename, move, delete, and view files directly from the command line.
Think of these as the tools in your digital toolbox. Just like you cut, paste, and rename files in Windows Explorer today, MS-DOS gives you text-based commands to do the same.
🔹 1. COPY – Copy Files
Purpose: Copies one or more files from one location to another.
Syntax:
Examples:
Copies notes.txt into the D:\Backup folder.
Copies all .txt files to D:\Docs.
Tip: You can copy multiple files at once using wildcards (* and ?).
🔹 2. XCOPY – Extended Copy
Purpose: More powerful version of COPY, supports copying directories, subdirectories, and multiple files.
Syntax:
Examples:
-
/S→ copies subdirectories (excluding empty ones) -
/E→ copies everything, including empty directories
Copies all .txt files from C:\Docs to D:\TextFiles.
🔹 3. DEL or ERASE – Delete Files
Purpose: Deletes one or more files.
Syntax:
Examples:
Deletes the file notes.txt.
Deletes all files with .tmp extension in the current directory.
⚠ Warning: DOS deletion is permanent — no Recycle Bin!
🔹 4. REN or RENAME – Rename Files
Purpose: Renames a file or group of files.
Syntax:
Examples:
Renames report.txt to final.txt.
Renames all .txt files to .bak (changes extensions).
🔹 5. MOVE – Move Files
Purpose: Moves files from one location to another (can also rename files).
Syntax:
Examples:
Moves notes.txt into D:\Docs.
Renames old.txt to new.txt.
🔹 6. TYPE – Display File Contents
Purpose: Shows the contents of a text file directly in the console.
Syntax:
Example:
Displays the content of notes.txt on the screen.
🔹 7. MORE – Paginate File Output
Purpose: Similar to TYPE, but displays text page by page.
Syntax:
Example:
Shows notes.txt content one page at a time (press spacebar to continue).
🔹 8. PRINT – Send File to Printer
Purpose: Prints a text file directly to the printer.
Syntax:
Example:
Sends report.txt to the default printer.
🧰 Bonus Tips
-
Use wildcards (
*and?) to manage groups of files quickly. Example:COPY *.doc D:\Backup. -
Be careful with DEL — there’s no undo. Use it with precision.
-
Use MORE instead of TYPE for large files so you don’t lose text scrolling off the screen.
✅ Conclusion
File operation commands are the heart of DOS usage. With these, you can manage your files without ever opening a graphical interface. They may look simple, but they’re incredibly powerful when combined with wildcards and batch scripts.
👉 Up next, in Part 4, we’ll explore System Information Commands — commands that tell you details about your computer like version, memory, date, and time.

No comments:
Post a Comment