This page includes all command prompt for USB data recovery. You can use CMD to recover files from USB flash drive, pen drive, external hard drive, and hard disk drive on the computer. If the command prompt can't help to retrieve files, you can use EaseUS Data Recovery Wizard to recover permanently deleted or corrupted files from USB.
Command Prompt, being as one of the handy Windows built-in utilities that enable users to take full control of your computer, could do you a favor in retrieving files after hiding, accidental deletion, corrupting, or virus infection. You can recover deleted or corrupted files from a computer hard disk, USB flash drive, pen drive, memory card, or other external hard drives using CMD.
Compared with professional data recovery software, the command prompt for data recovery has the following advantages and disadvantages.
Advantages:
Disadvantages:
Read this post and learn how to recover files from USB using CMD attrib to retrieve hidden files, or use other command lines to recover data from a pen drive or hard disk. What's more, you can use EaseUS Data Recovery Wizard to recover files from USB when the CMD fails.
In the following, you're going to learn all data recovery command lines that are available to use in some specific situations, including recover files from virus infected hard drive, recover files from corrupted drive with bad sectors and recover inaccessible files from the RAW drive.
Applicable to: Deleted, lost, hidden and even virus-infected files recovery
Supported devices: Windows hard drive, external HDD, USB, SD card, etc. storage devices
Attrib command only enables you to recover hidden files. If your files disappeared somehow, you could use the attrib command to check whether the file is hidden by unintentional operation or virus infection. For other data loss cases, such as formatting, partition turning RAW, or files being deleting, the attrib command won't work.
Step 1. Plugin your hard drive, memory card, or USB drive to your computer.
Step 2. Go to the start menu, type in "cmd" in a search bar, hit Enter. Then you can see something named "cmd. exe" under a list of programs.
Step 3. Right-click "cmd. exe" and then you will get the command windows that allow you to recover virus-infected files.
Type in "attrib -h -r -s drive letter:\*.* /s /d", for example, "attrib -h -r -s G:\*.* /s /d".
(Replace G with the drive letter of your hard drive or external storage device where you lost files.)
Applicable to: Deleted file recovery, recycle bin file recovery
Supported devices: Windows hard drive, Desktop
If you deleted files to the Recycle Bin, you can either choose to right-click files in the Recycle Bin or follow the command lines to restore them to the original location before emptying it.
Note: The command line can only recover files that are still in the recycle bin, not files that are not in the recycle bin or on the hard drive. If you want to recover files from emptied Recycle Bin, here are the tutorials.
Step 1. Go to the start menu, type: cmd in a search bar, and hit Enter. Click "cmd. exe" under a list of programs to open the command prompt.
Step 2. Type: start shell:RecycleBinFolder and press Enter.
Step 3. Select the files to restore.
Applicable to: RAW file system or corrupted file system recovery
Supported devices: RAW drive, inaccessible external HDD/USB/SD
If you lost files on external storage devices, connect to your computer in advance and open the command prompt in Windows. Log in with your administrator account and password if necessary.
Step 1. On the command window, type chkdsk drive letter: /r/f (e.g., chkdsk d: /r/f) and hit Enter. (Replace d with the drive letter of your storage device where you lost files.)
Step 2. On the command prompt window, type diskpart, and then hit on Enter.
Step 3. Type rescan and then hit enter.
Step 4. Exit DiskPart, type chkdsk /f d: in CMD and hit Enter. (Replace d with the drive letter of your storage device where you lost data.)
Wait for the process complete, and you can check the device to see if your lost files have been restored. If you didn't restore lost files using the above command prompt, or you need to get back files from more complex situations, such as recover data from lost partition in Windows 10/8/7, EaseUS Data Recovery Wizard with advanced features introduced below can help you figure out.
Since the command prompt is incapable of retrieving files under many circumstances, like restore data from dead computer hard drive, unformat hard drive, emptied recycle bin recovery, and so son, you need a CMD alternative for USB file recovery.
EaseUS Data Recovery Wizard can fully replace command prompt and allows you to:
To recover files from USB or pen drive without CMD, do as follows.
Step 1. Select a drive and start scanning
Launch EaseUS Data Recovery Wizard and hover over the partition where you lost data. This could be an internal hard disk, external disk, USB, or SD card. Then, click "Search for Lost Data".
Step 2. Check and preview scanned files
Use the file format filter on the left or upper right corner to narrow the scan results until you find the files you need. Then, you can click the "Preview" button or double-click a file to preview its content, if you'd like.
Step 3. Recover lost data to a secure location
Click the checkbox next to the file and click "Recover" to restore the lost data to your local storage or Cloud drive. We recommend that you do not store the recovered data on the disk where you lost it earlier.
This post covers all the command lines to recover hidden files, restore data from the recycle bin, and retrieve files from RAW partition. Follow the examples and be careful. Wrong command lines can make your data loss worse.
EaseUS Data Recovery Wizard is an easy-to-use file recovery tool that allows you to recover deleted or lost files with a few clicks. If you are a computer beginner and don't know how to use command prompt to recover files from USB, we highly recommend you try this simple data recovery software.
The following are the highly relevant questions about how to recover files using CMD. Check the brief explanations if you also have any of these problems.
What is attrib command in CMD?
The attrib command allows an MS-DOS and Windows command line user to change the attributes of a file or folder. For example, you could recover hidden files using the attrib command. The attrib command is available in the Command Prompt in all Windows operating systems including Windows 10, Windows 8, Windows 7, Windows Vista, Windows XP, and other older versions of Windows.
How can I recover files from a corrupted USB?
Is your USB corrupted? How to recover and open files on a corrupted USB drive? Use EaseUS data recovery program to recover files from corrupted, damaged or formatted HDD, SDD, USB flash drive, external hard drive, Pen drive, SD card, CF card, etc..
Step 1. Connect the corrupted USB flash drive to your computer and launch EaseUS USB data recovery software on your PC.
Step 2. Select your USB drive, which marks as a removable disk, and click "Scan" to start finding your files.
Step 3. Preview and recover all the files from corrupted USB.
How do you attrib a flash drive using command prompt?
Follow these steps to recover files from USB flash drive using CMD attrib:
Step 1. Right-click Windows icon and type cmd in the search bar.
Step 2. Select to run Command Prompt as Administrator. Sign in with your administrator account if necessary.
Step 3. Type: attrib -h -r -s G:\*.* /s /d (Replace G with the drive letter where you'd like to show hidden files) and hit Enter.
How do you use CMD to recover lost or deleted files?
You can use the attrib command to recover hidden files from a storage drive like hard drives, flash drives, USB. etc. You can follow these commands in the command prompt and easily retrieve deleted files from Windows 10, 8, 7:
Step 1. Press Windows + R key together in a search box, type CMD.
Step 2. In Command Prompt window, type chkdsk drive letter /f and press Enter. ( e.g.: chkdsk D : /f)
Step 3. Press Y 'Yes' until the command lines start again Again. Enter the drive letter and click Enter.
Step 3. Type drive letter and press Enter.
Step 4. Type /f --> attrib -h -r -s G:\*.* /s /d. This command will recover all hidden files in a storage device.
Related Articles
Free Undelete Software for Windows 10/11
Transcend USB Pen Drive Not Detected/Not Working
[Solved] Seagate External Hard Drive Beeping and Not Recognized? Get Complete Guide
Recover Deleted Volume Windows 10/11