How to Recover Flash Drive Files Using CMD

A brief introduction to CMD

 cmd

CMD is short for command. In the operating system, it is a working prompt that prompts for command input. We often use CMD to recover files, but only a few people can use it in that it’s sort of complex for users to operate. Don’t worry, this post aims to tell you more about how to recover flash drive files using CMD.

What is flash drive, and how to use it?

Before figuring out how to recover deleted files on flash drive using CMD, we should know what is USB flash drive first. A flash drive is a miniature high-capacity mobile storage product that requires no physical drive, and the storage medium it uses is flash memory. Flash drives usually use plastic or metal casings with a small printed circuit board inside, making the size of the flash drive easy to carry.

The most common use of flash drives is to store and backup files. When you want to use it , you can plug the flash drive into the computer, and then the system will report “found new hard drive”, after connecting, you can use the flash drive to store or backup files. By the way, its biggest advantage is that it does not need to be connected to the Internet.

With every storage device comes the risk of data loss. If we lose flash drive data, how can we retrieve them? In the following part, I will show you how to recover flash drive files using CMD.

Using attrib command to recover files

Have you ever accidentally deleted a flash drive file? Do you know how to recover it? I can give you several ways to let you know how to recover deleted files on flash drive using CMD. Your first choice can be attrib command, because it can recover the files from USB, HDD, SD card and other external hard drives without installing software. But its success rate in recovering files is not very high.

Step 1. Enter “CMD” in search bar, and run it as Administrator

Step 2. Type “attrib -h -r -s /s /d C:*.*”. (replace C with the destination drive)

using cmd

After operating, you can check whether the file is restored in the original place.

Restore flash drive files by using Windows File Recovery

In fact, attrib command is not widely used. As a command-line tool, Windows File Recovery is better. Why is it better?

Windows File Recovery was released by Microsoft in 2020, and is available for Windows 10 and above. It is a free and safe program. If you have some computer knowledge, it will help you a lot. Precisely because it’s a command-line tool so that people without computer background can’t use it easily. Windows File Recovery doesn’t provide an intuitive graphical interface, so people have to learn some professional computer vocabularies before using it.

Next, you will know how to recover files from USB flash drive using CMD by understanding the steps below. At first, you can get this freeware in Microsoft Store.

flash drive files using cmd

After installing, you have to know some parameters. Look at the table below:

Source drivewhere you have lost your files
Destination drivethe place that you store your recovered files
Moderegular & extensive
Switchnarrow the scanning range
File systemthe way your disk uses to store and retrieve the data

Then, you will select the appropriate mode depending on file system.

File systemScenariosmode
NTFSDeleted recentlyRegular
NTFSDeleted for a whileExtensive
NTFSFormatted diskExtensive
NTFSCorrupted diskExtensive
FAT and exFATAnyExtensive

Next, you have to choose a suitable switch for your command line.

SwitchesMeaningSupported mode(s)
/nTo filter the scan range: scans for a specific file with its file name/path/type, etc.All
/y:Recovers system files.NTFS​ / Segment​​​​
/uRecovers undeleted files, for example, from the Recycle Bin.NTFS / Segment

At last, you can enter the final command line and the command line structure goes like this: winfr source-drive: destination-drive: [/mode] [/switches].

The above two methods let us know how to recover flash drive files using CMD, Now, I will introduce you to use a simple freeware, WinfrGUI. Actually, WinfrGUI is an alternative to Windows File Recovery, but the difference is that WinfrGUI provides graphical user interface so it is very convenient for computer novice to use. Not only that, the success rate of recovery is good as well.

If you also think command-line tool is hard to operate, you can use WinfrGUI. Now, you can click the button below to get this software.

Step 1. Choose the range to scan, and then choose a place to restore files.

how to recover flash drive files 

Step 2. Select the scan mode, and determine the file type in “Advanced settings”.

how to recover flash drive files using cmd

Step 3. Click the “Start Recovery” to complete the process.

how to recover 

Sum up

There are given some methods to tell you how to recover flash drive files using cmd. But as you can see, WinfrGUI is more efficient in operating and friendly to users.

Leave a Reply