By Lora / Last update May 12, 2022

Why flash drive files get lost?

Though Cloud storage services and sync services are quite well-developed today, some prudent users prefer using USB flash drives to store their files.


Users tend to use flash drives to save backups of their important files or transfer files between devices. But sometimes users suffer from flash drive file loss and find no way to recover them.


How to retrieve lost files in flash drives


Hello, yesterday I went to the net cafe to save my files. On their computer, my flash drive works well and it said Trojan removed, but the trouble is that when I open it on my PC my flash drive is empty. Can somebody help me with this problem?


- Question from CCM


When it comes to the reasons for flash drive file loss, multiple factors can be found.

Accidental deletion. It’s not evitable to accidentally delete files.
Virus & malware. As in this case, the trojan is one of the reasons.
Physical damage. Physical damage to the USB flash drive makes the files in it inaccessible.
Improper ejection. Ejection USB flash drive without clicking Safe To Remove Hardware can do damage to your flash drive and cause corruption and data loss.

Is it possible to restore flash drive files?

Then, is it possible to retrieve files from flash drive? Simply put, yes, but with conditions. Some prerequisites should be met. The first thing you need to do is to stop using the USB flash drive after data loss.

When you found files deleted/lost from the flash drive, there could be a chance that your files are still not really removed from the drive but logically deleted. And then an available space will be generated for new data to write in.

At this time, if you continue to write new data to the USB, it is likely to cause the free space left after the logical deletion to be occupied, and the data you need will be overwritten and cannot be retrieved.

Some users are wondering if there are any free methods to recover those lost files, and some learned that they could use CMD. But it’s a pretty difficult task.

Now, this article is aiming at giving a detailed tutorial on using CMD command to recover files from USB, and an easy and free alternative will be provided in case you feel bothered to use CMD.

How to recover flash drive files using CMD?

You may have learned that you could use commands like “chkdsk X: /f” to recover your deleted/lost files, but this command is used to check whether there are any errors on the drive and does not help in the file recovery.

But if your flash drive is corrupted or cannot be summoned, you could try this command to fix it. Start CMD > select Run as administrator > input chkdsk X: /f (replace the real drive letter of the flash drive).

And the same is for “attrib -h -r -s G:\*.* /s /d”, this command is used to display or remove attributes of files, you could use it to unhide those hidden files.

If you want to use CMD command to recover files from USB, you could utilize Windows File Recovery, an official command-line app, to get your files back.

Before using this tool, you need to choose scanning mode and switches according to your file system & data loss scenarios.

To check the File System, head over to This PC > right-click on the flash drive > click Properties.


If the File System of your flash drive is not NTFS, then you cannot use Regular mode.

There are two general recovery modes: Regular & Extensive; two advanced modes: Segment & Signature.

To decide which mode to use, refer to the chart below.

File system Scenarios mode
NTFS Deleted recently Regular
NTFS Deleted for a while Extensive
NTFS Formatted disk Extensive
NTFS corrupted disk Extensive
FAT and exFAT Any Extensive

Switches are used to filter your scanning range. To decide which switches to use, refer to the chart below.

Switches Definition Supported mode(s)
/n Filter the scan range: scans for a specific file with its file name/path/type, etc. All
/y: Recover specific extension groups. Signature
/k Recovers system files. NTFS Segment​​​​​
/u Recovers undeleted files, for example, from the Recycle Bin. NTFS Segment
The source drive could not be the same as the target drive.
To get more details, please refer to "How to use Windows File Recovery"

Step 1. Go to Microsoft Store > search for Windows File recovery > click Get to install.


Step 2. After installation, click Open. Choose recovery mode & switches according to your data loss scenarios. Input the command:

winfr source-drive: destination-drive: [/mode] [/switches]

Source drive refers to the flash drive, please input the right drive letter.

Destination drive refers to the destination where you’d like to have the recovered files stored.


Step 3. Then wait for the recovery. If you choose the Extensive Mode, it will last for a while, please wait in patience.

How to recover flash drive files via software with a user interface?

It is not difficult to tell how tough it is to use CMD command to recover files from USB. Instead of using Windows File Recovery to retrieve your deleted files, you might as well utilize an easy alternative – WinfrGUI.

WinfrGUI, a 100% free tool, could help you recover your deleted files within 3 simple steps. Using this tool could free you from complex commands and save your time and labor.

If you are using Windows 10 and later, you could utilize this freeware.

Download Freeware Win 10 2004 and above
Secure Download
This tool only applies to Windows OS 10 and above. 
Fully invoking Windows File Recovery's function, it offers no guarantee of 100% success rate. 
Quick Scan only supports NTFS. Use Deep Scan to scan your non-NTFS flash drive. 
The destination drive could not be your flash drive, please choose another place to store the recovered files.

Step 1. Select the flash drive > select a drive or folder to save your recovered files.


Step 2. Select a scanning mode. Target the folder or path if you need it in Advanced Settings.


Step 3. Click Start Recovery, then your files could be successfully recovered.


How to retrieve files from flash drive much easier?

For those who find it difficult to use commands, and those who are using Windows OS under Windows 10, is there no way for them to recover files easily? Rest assured, you still have a great chance to get your precious files back with a professional data recovery tool. 

AOMEI Data Recovery for Windows, specially designed for Windows users, can assist users to detect their deleted or missing files using its advanced scanning methods. 

★Shining points of AOMEI Data Recovery for Windows
Resote deleted data and retain its format, filename, and path. 
Support data recovery from HDD/SSD/USB/SD card, etc. 
Retrieve over 200 types of data. 
Highly compatible with Windows OS 11/10/8/7 SP1 & Server.

Now download this efficient application to start Windows data recovery with ease.

Download SoftwareWin 11/10/8/7/Server
Secure Download

Step 1. Run the software > select a partition to scan > click  Start Scan.


Step 2. While scanning, you could directly recover what is detected or wait for the whole scanning result.


Step 3.  Select the data you want to recover > Recover x files. Please remember to save these files to another drive.


Also, you could utilize this tool to recover permanently deleted files in Windows 10.

Related suggestions

To avoid you from falling into a similar dilemma again one day, here are some sincere suggestions for you.

Plug in & eject the USB flash drive properly every time.
Keep your flash drive away from liquid, dirt, oil, or other harmful materials.
Keep your important data backed up regularly.
Save the backup copies in different places.

To back up files smartly and easily, it is recommended to take advantage of AOMEI Backupper, a good backup tool for Windows users.

In this article, a detailed method on how to recover flash drive files using CMD has been introduced. In addition, a good Windows File Recovery alternative is given as well. Don’t hesitate to use AOMEI Data Recovery for Windows to retrieve deleted files in Windows 10/8/7 and 11 easily.