Apr 10, 2023 • Filed to: Take Data Backup • Proven solutions
File recovery is a process through which you can regain lost data on your computer, external hard drive or other device. There are many reasons why you could lose your files – accidental deleting, malware corruption, power outages, power surge and a host of others.
It’s utterly frustrating when you cannot access important data when you thought they were safely stored. If you have lost any files from your flash drive, I have good news for you. You can get them back by using the command prompt. Also, if you have been searching for how to recover corrupted files in flash drive using cmd, then your search is over. This article is a step-by-step guide on how to recover your flash drive files using cmd. I also explore the limitations of this technique and how to work around them.
- What is CMD?
- How to recover files from USB flash drive using CMD
- Why Recoverit is the Best File Recovery Solution
- How to repair your files using Recoverit
- Reasons for USB data loss
CMD is short for command prompt. It is a windows application that enables you to give instructions to your computer using lines of text. After you enter the text, your computer interprets your instructions and executes them.
The major benefit of command prompt is that it allows you to access and control your computer’s actions without passing through the Operating System. Also, since it’s a text-only platform, it requires minimal system resources to work.
To recover your lost flash drive files, follow these steps carefully:
Step 1. To learn how to recover corrupted files in flash drive using CMD, you first need to plug in your USB Drive to your System. Do make sure if your USB Drive is detected by the System or not. You can also go to, "This PC" and look for your USB Stick to confirm that it's successfully connected to your System.
Step 2. Now, from the home screen, go to the search panel of your taskbar and search for "CMD". Or you can also use the shortcut key "Window+R" to access the "Run" program and search for "CMD". In both cases, you need to access the "Command Prompt" window as an "Administrator
Step 3. Once you are on the Command Prompt window, you will have to process in a few commands by typing those commands and pressing "Enter". Type command "chkdsk #: /f" and press Enter to process the command. Before you click the Enter, you need to replace "#" in the command with the Drive letter of your connected USB drive from which you want to recover files.
Step 4. Now, type "Y" and press Enter. You will see the command line starting again. You need to type the Drive Letter again on the command line and press Enter. As soon as the command is processed, the command line will get restored to its initial position.
Step 5. Finally, give the command "#: \ >attrib –h –r –s /s /d *.*" and press Enter ("#" needs to be replaced with the Drive letter). This is the command that will initiate the recovery of all of your files from USB Drive.
In the given command "#: \ >attrib –h –r –s /s /d *.*" :
-h applies the Read-Only attribute to selected files.
-s applies System Attribute to selected files.
-h applies Hidden Attribute to selected files.
/S commands the search for specific paths.
/D commands the searching and processing of folders.
Step 6. After the last command is processed, all of your deleted files from USB Drive will be recovered successfully using CMD. You can now access all the restored files at location "attrib -r -s drive:\\" in your storage Drive.
Although Command Prompt is an integrated feature and is capable to recover your deleted files from USB in most cases, it is known to fail in some cases. You cannot always rely on CMD to recover your extremely important data from your USB Drive.
These 6 steps should guide you to recover corrupted files using cmd. If it’s not successful, you could go through them again or keep reading for a better alternative.
Limitations of Command Prompt
Using cmd command to recover files from USB can be effective, but as you may have noticed, it can be quite technical. The process will only be successful if you get all the steps right. Omitting just one letter or putting the wrong punctuation will return an error message.
Additionally, even if you know how to recover corrupted files in flash drive using cmd, the process can be time consuming. Looking at the steps listed above, it will take you some time to type it all.
The cmd method takes so much time because the texts have punctuations that will prevent you from typing as fast as you would like. Besides, you would be trying to avoid mistakes too, adding even more time to the process. In essence, you would be spending a lot of time on a process that has a wide margin for error.
So, what’s the solution? You need a precise and accurate tool that will help you to recover your files without taking so much of your time. To achieve this, Recoverit is the tool you need.
There are different kinds of file losses, so you can have different tweaks to the command prompt to address each of the issues. There are more than 1000 different types of file recoveries. How to recover formatted files from USB using cmd is slightly different from the steps you will take to recover hidden files in USB using cmd.
Recoverit helps you to retrieve more than 1000 different types of file losses. It is a fast, precise and accurate tool that requires minimal input from you for a successful file recovery. So, even if you have learnt how to recover flash drive files using cmd, Recoverit will help you save time and ensure that you get a desirable result.
Download | Win Download | Mac
That’s not all. The interface is clear and easy to use. Just a few clicks is all you need and you have all your lost files back.
Step 1. Storage Drive Selection
First, plug in the thumb drive, and then launch the Recoverit tool. In the tool UI, the first window you will see is the "Storage Drive Selection" window. On this window, look for your USB Drive under the External Devices section. Select the USB Drive from which you want to recover files and click "Start".
Step 2. Scanning and Filtering
Now, once the scanning has started, you can filter the scanning process by using many Filters like File Type, Name, Size, etc. located at the right-hand and left-hand panel of the window. After the scanning is finished you will see all of the recoverable files.
Step 3. Preview and Recover
You can search for the files or navigate to them. Once you find the files you want to recover, then you can use the "Preview" option to make sure of the file and its quality before recovery. Now select all the files that you wish to recover and click "Recover". Choose a secure location on your System for restoring the files and click "OK".
The very time you will click OK, all of your deleted files from USB will get restored in the PC. You can simply navigate to the location and can access all the files.
What could be responsible for sudden loss of your files from your flash drive, requiring you to recover corrupted files using cmd?
This can easily affect cheaper USB sticks. The usually cannot handle high temperatures. If you usually use your flash drive in very hot conditions, it will likely get damaged and make you lose your files. So, even if you know how to recover flash drive files using cmd, you may not get the desired result if your flash drive is still too hot.
While inserting or ejecting your flash drive form the computer, avoid applying too much pressure. If you use eject or insert forcefully, you risk damaging the USB connector in more fragile drives. Such action may damage your files such that you’ll need to recover corrupted files using cmd.
For one reason or another, you may delete some files by mistake. It’s even easier for this to happen with a flash drive because your files don’t go into the recycle bin. Once you accidentally delete a file from your flash drive, there’s no undo button. You must either use a cmd command to recover files from USB drive or go the easier way – use Recoverit.
Whatever the reasons for losing your files, Recoverit will help you recover them in just 3 easy steps.
You can recover flash drive files using cmd, but it will cost you a lot of time and effort. Recoverit makes this process easy and accessible in just 5 clicks or less.
Download | Win Download | Mac
Data Backup Services
- Computer Backup
- Windows 10 Backup
- Windows 8 Backup
- Best File Sync Software
- Driver Backup
- SD Card Backup
- Best Incremental Backup
- Onedrive Automatic Backup
- Hard Drive Backup
- CMD Backup
- External Hard Drive Backup
- Hard Drive Backup Software
- Move Files from C Drive to D Drive
- Best Backup Hard Drive
- Mac Backup
- Mac Backup Icloud
- Mac Backup Solutions
- Top Mac Hard Drive Backup Softwares
- Cloud Backup
- Backup OneDrive Files to External Drive
- Backup Photos to Google Drive
- Sync Files Outside Dropbox Folder
- iCloud Drive Not Syncing on Windows 10
- Synology Cloud Station
- Sync Local Folders to OneDrive
Step 1: Press Windows +R keys simultaneously, and key-in cmd in the search box. Step 2: in the command line, key in chkdsk G/f where G is the disk letter you desire to recover. Step 4: Again, enter the drive letter, for this case, G and hit the Enter key. The command line will go back to start.How to use CMD to recover files? ›
Step 1: Press Windows +R keys simultaneously, and key-in cmd in the search box. Step 2: in the command line, key in chkdsk G/f where G is the disk letter you desire to recover. Step 4: Again, enter the drive letter, for this case, G and hit the Enter key. The command line will go back to start.How to recover formatted files from USB using CMD? ›
- Open a command prompt by typing cmd in the Windows search box.
- Select run as administrator.
- Type this command: chkdsk G: /f/x/r. Replace G with the drive letter of the formatted USB drive.
- Hit Enter and let the process complete.
- Open the start menu and type “cmd”. Hit Enter on your keyboard.
- Enter the following command (make sure to replace DRIVE_LETTER with the letter assigned to the hard drive you want to fix) and press Enter: chkdsk DRIVE_LETTER: /r.
- Wait for CHKDSK to finish.
Connect your corrupted USB device to your PC or laptop. Go to the folder where you saved your files before they were deleted. Right-click on that specific folder and a dropdown menu will appear. Select Restore a previous version.How to recover missing files in cmd? ›
- Press Win + R keys and type: cmd, hit Enter to open Command Prompt window as an administrator.
- Type: chkdsk E: /f and hit Enter. ( ...
- Type: Y and hit Enter to continue.
- Type: G: and hit Enter again. ( ...
- Type: attrib -h -r -s G:\*.* /s /d and hit Enter. (
Recover Permanently Deleted Files using Command Prompt
Step1: Launch the Start menu and type cmd in the Search bar. Step 2: Now, choose and select the Run as administrator option. Step 3: Type chkdsk *: /f in the command prompt window. Ensure to replace * with your hard drive letter and hit the Enter button.
- Download and install Disk Drill to your computer. Open it.
- Select your USB, then click Search for lost data.
- Click Review found items once the scan is complete.
- Mark what files you want to recover. ...
- Choose the output location.
- Press Windows + R keys to bring up the Run box. Type: diskmgmt. ...
- In Disk Management, locate the unreadable flash drive, check its disk information. ...
- Choose a file system like NTFS, FAT32 or exFAT and the Perform a quick format checkbox.
To open files on a corrupted USB drive, you can follow this way: Using CHKDSK in Windows or Disk Utility in macOS to fix the drive's corruption. Then Recover the files with USB recovery tool like Wondershare Recoverit. Note: don't format the USB drive, or all the files stored on it will be wiped out.
The sfc /scannow command will scan all protected system files, and replace corrupted files with a cached copy that is located in a compressed folder at %WinDir%\System32\dllcache. The %WinDir% placeholder represents the Windows operating system folder.How do I run chkdsk on a flash drive? ›
- Connect your Drive with System.
- Under search bar, type cmd.
- Hit Enter.
- Right-click cmd. Exe.
- Type in either "chkdsk /X /f USB drive letter:" or "chkdsk USB drive letter: /f " to repair damaged the drive.
- At the end, a message: Windows has made corrections to the file system will pop-up.
Recovers readable information from a bad or defective disk. This command reads a file, sector-by-sector, and recovers data from the good sectors. Data in bad sectors is lost. Because all data in bad sectors is lost when you recover a file, you should recover only one file at a time.How do I find corrupted files in cmd? ›
- Click Start.
- In the search bar, type CMD .
- Right-click CMD.exe and select Run as Administrator.
- On the User Account Control (UAC) prompt, click Yes.
- In the command prompt window, type SFC /scannow and press Enter .
- System file checker utility checks the integrity of Windows system files and repairs them if required.
Open Command Prompt. Type rstrui.exe in the window, and then press Enter. Follow the on-screen instructions to complete the system restore.Can deleted files ever be recovered? ›
If you can't find a file on your computer or you accidently modified or deleted a file, you can restore it from a backup (if you're using Windows backup) or you can try to restore it from a previous version. Previous versions are copies of files and folders that Windows automatically saves as part of a restore point.Is it possible to recover permanently deleted files? ›
Windows will write down the previous versions of permanently deleted files. If there are no available previous versions, you still can use this method: create a new file with the same name as the deleted file. Again: “Properties” -> “Restore previous version -> "Restore".How to recover files from found 000 folder using cmd? ›
- Method 1: Convert Files of Found.000 Folder Into Original Format.
- Method 2: Recover CHK Files Using CMD.
- Method 3: Restore CHK Files FromPrevious Versions.
- Method 4: Recover Data From Found.000 Using AnyRecover.
- Backup Your USB Drive. ...
- Retrieve Data With Recovery Tool. ...
- Method 1: Try Different USB Ports. ...
- Method 2: Repair File System on Your USB. ...
- Method 3: Fix Damaged USB Partition with TestDisk.
In the Start menu search bar, search for command prompt and select Run as administrator. Then, type chkdsk x: /f /r and press Enter. Remember to replace x with your drive letter. Windows will now scan the drive and look for any bad sectors, directory errors, lost clusters, and recover data if necessary.
- Method 1: Reconnect the Drive.
- Method 2: CheckDisk (CHKDSK)
- Method 3: Scan for Viruses.
- Method 4: Update the Drivers.
- Method 5: Change the Drive Letter.
- Method 6: Reinstall Drive in Device Manager.
- Method 7: Formatting.
- Method 8: DiskPart.
- Open File Explorer.
- Go to This PC.
- Right-click the corrupted USB flash drive and choose the Properties option.
- Navigate to the Tools tab.
- Click Check.
- Select the Scan and repair drive option.
- Wait for the Error Checking tool to repair your drive.
You can utilize CHKDSK command to repair hard drives, USB drives, SD cards and other external drives. Runing Windows chkdsk /f command prompt on the flash drive can check file system errors, which are the major cause of corrupted USBs.How do I know if my flash drive is corrupted? ›
When your USB drive gets corrupted or damaged, you will get an error message like "Please Insert Disk into Removable Disk". The other common errors: "USB Device Not Recognized or Malfunctioned", "you need to format the disk before using it". The error is a clear indicator of a corrupt flash drive controller software.How do I recover a file that has disappeared? ›
Right-click the file or folder, and then select Restore previous versions. You'll see a list of available previous versions of the file or folder. The list will include files saved on a backup (if you're using Windows Backup to back up your files) as well as restore points, if both types are available.How do I see all files in cmd? ›
Navigate to the directory containing the folders you wish to appear in your list. Click in the address bar and replace the file path by typing cmd then press Enter. This should open a black and white command prompt displaying the above file path. Type dir /A:D.