[Stepwise] How to Recover data from Flash Drive using CMD?

In this post, you will learn to recover data from flash drive using CMD. You can also get other ways to recover lost data from external hard drives.

Posted by @Irene September 6, 2024 Updated By @Irene September 6, 2024

Need to recover data from flash drive using CMD

It's common for users to accidentally delete files from a USB flash drive, and some of these files may contain important information. Additionally, some users don't properly eject the USB drive, which can cause not only the loss of files being transferred but also other files on the drive.

There are other common reasons why data may disappear from USB drives, such as:

● Malware or virus infection ● Formatting the USB drive by mistake ● Physical damage to the drive ● Hardware failure ● Software errors ● Power supply issues to USB ports

To recover your files, please stop using the USB drive as soon as you notice the data is missing. Kindly eject it safely and store it securely. Avoid copying any data to or from the drive, as this could make the recovery process more difficult.

Since CMD (Command Prompt) is familiar to most Windows users, it often becomes their first choice for recovering files from a USB drive. In this article, we will guide you on how to use CMD to recover hidden files from a USB or use other command-line options to restore data from a pen drive or hard drive. Moreover, if CMD fails or if you're looking for an easier and more efficient method, you can use AOMEI FastRecovery to recover files from a USB drive.

Free DownloadWindows PCs and Servers
Secure Download

How to recover data from USB drive using CMD

Sometimes, files may seem to disappear due to virus infections or other issues that change file attributes. This makes files or entire folders hidden. You can use the "attrib" command to check if the files are hidden on Windows devices, including hard drives, USB, SD card, and external HDD.

 

However, the attrib command won't help if your data is lost due to formatting, a partition turning RAW, or files being deleted.

Step 1. Connect the USB drive that stores secret files to your computer. Make sure that your computer can detect this USB flash drive.

Step 2. Press the “Windows + X” keys, then select “Windows PowerShell (Admin)”.

Step 3. Enter attrib -h -r -s /s /d G:\*.*” and press “Enter” after the Command Prompt window pops up. You can replace “G” with the drive letter of your USB.

Step 4. This process will finish after the command prompt returns back the original location. Then you can go to the destination place to check these files.

If you encounter disk errors like the USB RAW file system, you can run command "chkdsk" to check a hard drive or other disk drives for errors and repair them if possible.

Step 1. Run Command Prompt as Administrator.

Step 2. Type "chkdsk g: /f /r  /x" and hit Enter.

(Replace "g" with the exact letter of your external hard drive.)

This is how to recover data from USB drive using CMD. If you need to recover data from USB flash drive not recognized,  you can click to get solutions.

How to easily and effectively recover data from USB flash drive?

The command prompt can't recover files in many cases, like from a dead hard drive, unformat hard drive, or an emptied Recycle Bin. Besides, as you may realize, to recover data from flash drive using CMD is not easy for everyone. That's why we've provided a simpler option for recovering data from flash drives, hard drives, and more. This tool, called AOMEI FastRecovery, is effective in handling various data loss situations. It offers a high success rate, fast speed, and a user-friendly interface, making it easy to use, even for beginners.

Free DownloadWindows PCs and Servers
Secure Download

Step 1. Install and launch AOMEI FastRecovery. Choose the exact partition or disk where your data is lost and click Scan.

Step 2. Then, the recovery tool start to scan and search. lt will execute the “Quickly Scan" first for finding your deleted data fast, and then execute the “Deep Scan" for searching other lost data.

Step 3. Once the scan is completed, all deleted files, recycle bins and other missing files will be displayed. Please select the file you would like to recover and then click "Recover".

Step 4. Then, select a folder path to save your recovered files.

Step 5. Wait patiently for this process of recovering end.

Conclusion

Here is everything you need to know about using CMD to retrieve information from a flash drive. Utilise the tools that are readily available on your computer, such as attrib or CHKDSK.  Additionally, we introduced AOMEI FastRecovery, a more user-friendly solution for recovering files from flash drives. It's simple to use and can retrieve any type of information. Give it a shot. By setting up your flash drive to regularly back up your files, you can ensure that you won't lose any data in the future.