How to Recover Deleted Files in USB Using CMD

I’ve lost files on my USB drive more times than I can count, and it’s always a pain. Learning how to recover deleted files in USB using CMD really helped me out. Windows has this built-in tool called winfr that lets you grab back your files right from the Command Prompt—no extra software needed. At first, I wasn’t sure about using commands, but it turned out to be pretty straightforward once I gave it a try. If CMD feels like too much, there’s WinfrGUI, a free and simple app that does all the work with just a few clicks. The biggest tip? Act fast before your data gets overwritten. Honestly, knowing these tricks saved me a lot of headaches when I accidentally deleted stuff from my USB.
What Is WinFR CMD?
winfr is Microsoft’s official command-line utility designed to recover deleted or lost files on Windows 10 and 11. It supports various recovery modes and works on USB drives, hard drives, SSDs, and more. Whether your files were lost due to accidental deletion or quick formatting, winfr offers a deep recovery solution right from the terminal window.
Basic Syntax of WinFR CMD
Before diving into real examples, here’s the general structure of the winfr command:
winfr source-drive: destination-folder [/mode] [/n filename] [/y:filetype]
Explanation of Common Parameters
| Parameter | Description |
|---|---|
/mode | Specifies the recovery mode: regular, segment, or signature |
/n filename | Filters file names or patterns (e.g., *.docx, \Documents\*.pdf) |
/y:filetype | Used with signature mode to recover by file type (e.g., PDF, JPG) |
source-drive: | The drive where files were lost, e.g., E: |
destination-folder | The location to save recovered files (must be different from source) |
How to Recover Deleted Files in USB Using CMD ?
Step 1: Install Windows File Recovery from the Microsoft Store. Search for “Windows File Recovery” and click Install.
Step 2: Plug in your USB drive and note its drive letter (e.g., E:). You’ll find it under This PC in File Explorer.
Step 3: Create or select a destination folder on a different drive. Recovered files can’t be saved back to the same USB.
Step 4: Open Command Prompt as Administrator. Right-click Start > choose Command Prompt (Admin) or Windows Terminal (Admin).
Step 5: Enter the appropriate recovery command. Scroll down for real examples based on file types or scenarios.
Examples to Recover Deleted Files in USB Using CMD
To help you get started, here are some practical examples of how to recover deleted files in USB using CMD with the winfr tool. Each example includes a command and a quick explanation so you know exactly when and how to use it.
Example 1: Recover A Deleted File in USB Drive
winfr E: D:\Recovery /regular /n *.docx
Scenario: You accidentally deleted a school report from your USB drive (E:). This command scans the USB for any .docx files using regular mode and recovers them to D:\Recovery. It’s ideal for recently deleted Office files where no major file system corruption occurred.
Example 2: Deep Scan for Photos
winfr E: D:\Recovery /segment /n *.jpg
Use the segment mode to perform a deeper scan for deleted photos (*.jpg). Ideal when files are fragmented or partially overwritten.
Example 3: Recover Videos by Signature
winfr E: D:\Recovery /signature /n *.mp4
Recover deleted videos (*.mp4) using signature mode, which scans file structures. Best when the file system is corrupted or damaged.
Example 4: Recover a Specific Excel File
winfr E: D:\Recovery /regular /n myfile.xlsx
Target and recover a specific deleted Excel file named myfile.xlsx. Saves time by focusing on one important file.
Example 5: Recover Files by Keyword
winfr E: D:\Recovery /regular /n *report*
Recover all deleted files containing “report” in their filename. Useful for quickly retrieving related documents.
Use WinfrGUI if CMD Is Too Complicated
If winfr feels too technical or fails to recover your data, consider using WinfrGUI — a free graphical interface built on the same engine.
Why Use WinfrGUI?
✅ 100% Free, no ads or limits
✅ Built on Microsoft’s recovery engine
✅ Beginner-friendly with one-click scanning
✅ Supports USB, HDD, SSD, and more
✅ Preview files before recovery
How to Use WinfrGUI?
Step 1: Download WinfrGUI from the official website and install it according to the instructions
Step 2: Select your USB drive as the scan source(quick scan & deep scan)
Step 3: Click Start Recovery to scan and preview recoverable files
Step 4: Choose files to restore and save them to a different drive
Common Problems and Tips to Avoid Them
Q1: No files found after running the command?
This often happens if the deleted files are fragmented or the standard scan misses them. Try using segment or signature modes instead of regular mode. These options perform deeper scans by analyzing file segments or file signatures, improving chances of recovery.
Q2: The command won’t run or crashes during execution?
Make sure you typed the command exactly, including drive letters and spaces. Also, ensure that the destination folder where recovered files will be saved is not on the same USB drive you’re scanning—saving there can cause conflicts or crashes.
Q3: USB drive doesn’t show up in Command Prompt or recovery tool?
Try unplugging the USB drive and plugging it back in. If it still doesn’t appear, open Disk Management (type diskmgmt.msc in Run) and check if the USB has an assigned drive letter. If missing, right-click the partition and assign a new letter.
Q4: Recovered files are corrupted or can’t be opened?
This usually means parts of the file were overwritten. Try signature mode for a deeper scan. You can also run sfc /scannow or DISM to fix corrupted files in Windows 11, especially if the issue affects system-related files. The sooner you act, the better the results.
Q5: Scanning large USB drives takes a long time—what can I do?
Yes, scanning large drives can be time-consuming, especially with deeper modes like segment or signature. Avoid interrupting the process, and be patient—it’s thoroughly searching for all recoverable data to maximize success.
Related Commands You Should Know
Besides the main winfr command for recovering deleted files, there are several other useful Windows commands that can help manage or troubleshoot your USB drive:
- chkdsk: Checks the USB drive for file system errors and attempts repairs. Useful if your USB is corrupted or not recognized properly.
chkdsk E: /f(Replace E: with your USB drive letter.) - diskpart: A powerful disk management tool for creating, deleting, and formatting partitions on your USB drive. Handy if your drive needs repartitioning or formatting.
diskpart - attrib: Helps you view or change file attributes like hidden or read-only. Sometimes deleted files are just hidden or marked read-only.
attrib -h -r -s /s /d E:\*.* - sfc /scannow: Although mainly for system files, it can help fix corrupted Windows files that might affect USB device recognition.
These commands complement winfr by helping maintain, troubleshoot, and prepare your USB drives for recovery or regular use. Understanding them can improve your overall data management skills.
Conclusion
Being able to recover deleted files in usb using CMD is a handy skill, especially when you don’t want to rely on extra software. Microsoft’s powerful winfr tool lets you bring back documents, photos, and more right from the Command Prompt. But if that seems too tricky or doesn’t get the job done, WinfrGUI has got your back. Whatever method you pick, remember to act fast before your data gets overwritten—and don’t forget to back up your important files regularly!
🔗 Also Read: How to Recover Deleted Files from Flash Drive Using CMD