iti
18 April 2025
📁 Using Basic DOS Commands for Directory Listing, File, and Folder Management
The Disk Operating System (DOS) Command-Line Interface (CLI) allows users to manage files and directories efficiently. In this section, we will learn how to use basic DOS commands to list directories, manage files, and perform other essential file operations.
📘 Introduction to DOS Commands
In DOS, commands are typed into the Command Prompt window to interact with the system. These commands allow you to perform a variety of tasks such as viewing files, navigating directories, and manipulating files and folders.
🧭 Basic DOS Commands
- dir: Lists the files and directories in the current directory.
- cd: Changes the current directory.
- md (mkdir): Creates a new directory.
- rd (rmdir): Removes an empty directory.
- del: Deletes a file.
- copy: Copies a file or folder to a new location.
- move: Moves a file or folder to a new location.
- rename (ren): Renames a file or folder.
- cls: Clears the screen.
- exit: Closes the Command Prompt window.
📄 Working with Files and Directories
Below are some common tasks related to managing files and directories:
1. 📂 Navigating Directories
- To see where you are in the directory structure, use the
cd
command with no parameters: - To move up one level in the directory tree, use
cd ..
.
2. 📁 Creating a Directory
- To create a new directory, use the
mkdir
command:
3. 💾 Copying Files
- To copy a file from one directory to another, use the
copy
command:
4. 🗑️ Deleting Files
- To delete a file, use the
del
command:
5. 🔄 Moving or Renaming Files
- To move or rename a file, use the
move
command: - To rename a file, use the
rename
command:
📋 Summary
- DOS commands are essential for managing files and directories in older operating systems or when troubleshooting modern systems.
- Key DOS commands like
dir
,cd
,copy
,del
, andmd
are used for listing, navigating, and manipulating files and folders. - Being comfortable with DOS CLI can improve your efficiency in system management tasks and provide a solid foundation for working with more modern operating systems. 💻