Your cart is currently empty!
How to Find and Open Files Using Command Prompt
If you’re working on Windows and want a faster way to locate and open files, learning how to use Command Prompt (CMD) can save you time and boost your efficiency. In this guide, we’ll walk through the basic commands to help you find and open files using CMD—no fluff, just practical steps.
Why Use Command Prompt?
Command Prompt gives you direct control over your files and system processes. While most users stick to the graphical interface, CMD offers a quicker and often more powerful way to navigate and manage files, especially when dealing with large directories or scripts.
Step 1: Open Command Prompt
You can open CMD in several ways:
- Press
Win + R
, typecmd
, and hit Enter. - Or search “Command Prompt” in the Start menu and click on it.
Once it opens, you’ll see a black window with a prompt like this:
C:\Users\YourName>
Step 2: Navigate to the Right Directory
Use the cd
(change directory) command to move through folders. For example:
cd Documents
To go back one directory:
cd ..
To go to the root of the C drive:
cd \
To switch drives (e.g., to D:):
D:
Step 3: Find a File
If you’re looking for a specific file, use the dir
command with a wildcard (*
):
dir filename.* /s
For example, if you’re searching for a file named “report.docx”:
dir report.docx /s
The /s
flag tells CMD to search all subdirectories. It will show you the full path of every matching file.
Step 4: Open the File
Once you’ve found the file and see its full path, you can open it using the start
command:
start "" "C:\Users\YourName\Documents\report.docx"
If it’s a file associated with a specific app (like .docx for Word or .txt for Notepad), CMD will use the default program to open it.
You can also open files directly in Notepad like this:
notepad "C:\Path\To\Your\File.txt"
Bonus: List All Files in a Directory
If you just want to browse everything in a folder:
dir
Want to see everything including hidden files?
dir /a
Wrapping Up
Using Command Prompt might seem intimidating at first, but once you get the hang of it, it’s a powerful tool for managing files quickly. Whether you’re a casual user or a developer, mastering a few CMD commands can make your workflow faster and more efficient.
Want more CMD tips? Leave a comment or reach out!