How to Recover Lost Partition on External Hard Drive Using CMD

Do you want to use CMD to retrieve the lost partition on the external hard drive? Keep reading this article to discover the major steps for retrieving lost partitions on external HDD with EaseUS Data Recovery Wizard and TestDisk.

 Download for Win Recovery Rate 99.7%
 Download for Mac Trustpilot Rating 4.7

Page Table of Contents

Updated By


Written By


Updated on

16 May 2024

Min Reading

9 Min

launch the Command Prompt

Step 1. Hit the "Windows + R" keys to launch the "Run" window.

Step 2. Type cmd, followed by the "Enter" button.

Step 3. Once the "Command Prompt" opens, you should go to the "start" menu and type "cmd" again.

Step 4. Right-click on the first preference and opt for "Run as Administrator," which will launch the Command Prompt.

Partitions are crucial to your PC, and it's undeniable that these partitions are not ideal and could be vulnerable at times. Hence, the main reason for you being here is you must have deleted a partition mistakenly, and now you would like to recover it.

For instance, if you have two partitions on your external HDD and one was deleted accidentally, you can only access another partition now. That mistakenly lost partition must have contained several crucial documents, photos, videos, and more. Are you wondering how to recover a lost partition on an external hard drive?

Luckily, there are a few fantastic ways to fix your issues with these partitions, and the best of all is to know how to recover lost partitions on the external hard drive using CMD. Although it might sound absurd to some, it's worth the effort! Let's discuss the best ways to retrieve lost partitions on external HDD using CMD without delay!

How to Recover Lost Partition on External Hard Drive Using CMD

CMD, aka Command Prompt, is the input box in a text-oriented operating system (OS) or program's user interface display called a command prompt. To trigger an action, a signal is intended. A blinking cursor appears after a short text sequence when the user writes commands into the command prompt.

The command CHKDSK can be used in Command Prompt to check the file system's logical consistency. In reality, check disk is the full name of CHKDSK; as the title implies, its purpose is first to detect and then repair corrupted external hard drives.

CHKDSK creates and displays the disk information based on the partition file system. Individuals will see the disk status on the present drive if they type CHKDSK without parameters being entered.

related articles

How to Recover Formatted Hard Drive/SD Card/USB Data Using CMD

Don't worry if you have formatted a hard drive, SD memory card, or USB pen drive in Windows 10/8/7. 

The steps to recover deleted partitions on external HDD using CMD are the following:

Step 1. Ascertain the deleted partition

  • Hit the "Windows + R" keys on your keyboard to launch the "Run" command.
  • Type diskmgmt.msc, hit the "OK" button.

Type the command and hit the ok button

At the underneath of the Disk Management window, something marked "unallocated" will be seen, which is the deleted partition you're searching for.

Step 2. Access the command prompt

Once you ascertain the partition you must retrieve, you must access the tool you will utilize to recover deleted partitions using CMD. It must be none other than "Command Prompt."

  • Hit the "Windows + R" keys to launch the "Run" window,
  • Type cmd, followed by the "Enter" button.
  • Once the "Command Prompt" opens, you should go to the "start" menu and type "cmd" again.
  • Right-click on the first preference and opt for "Run as Administrator," which will launch the Command Prompt.

Hit the command prompt

Step 3. Type right commands

  • By entering the relevant commands, you can perform several specific tasks on the Command Prompt.
  • Typing diskpart and hitting the "Enter" button will let you enter the "Diskpart" mode.
  • These commands need to be typed: list disk - select disk - list volume - select volume - assign letter=?.

Type the mentioned commands

You must not forget to eliminate "-" symbols. The disk letter should correspond to the location of the removed partition on the disk. After the restoration procedure, you intend to allocate your chosen drive letter to the lost partition, corresponding to the removed partition's letter. As soon as you accomplish this, the healing process ought to begin. Finally, close the Command Prompt window to complete the procedure.

Recover Lost Partition on External Hard Drive CMD's Alternative

Instead of recovering a lost partition on an external HDD using CMD, there are two best ways to do that without a hitch. The two major alternatives of recovering files from USB using cmd attrib are illustrated below:

Solution 1. Recover Lost Partition with EaseUS Software

Stop writing additional data and using the disk as soon as possible if your device is destroyed. The likelihood of recovering deleted documents significantly decreases if you keep using an external hard drive because freshly acquired information will probably overwrite the lost ones. In these situations, you should repair your external hard disk after backing up and retrieving your data using specialist file recovery software.

 Download for Win Recovery Rate 99.7%
 Download for Mac Trustpilot Rating 4.7

EaseUS Data Recovery Wizard is the one-stop software to recover lost partitions. This professional tool can accomplish many things, including moving partitions to the end of the disk, EFI system partition, converting GPT disk to MBR, and a lot more. The main highlights of this tool are the following:

  • It supports different types and brands of hard drive recovery.
  • Restores lost or deleted partition files, including videos, photos, emails, audio, and other 1000+ files from 2000+ storage devices.
  • It supports every renowned file system, including FAT32, NTFS, HFS+, APFS, EXT4, etc.
  • The overall requirements of 3DS

Step 1. Choose and scan the external hard drive

  • Download and install EaseUS Data Recovery on your PC or laptop. 
  • Connect the external hard drive to your computer.
  • Run EaseUS Data Recovery Wizard and choose the external drive from External drives list. Then, click "Search for Lost Data". 
select external hard drive

Step 2. Check the scan results

  • EaseUS data recovery software will immediately scan the selected drive for all data, including deleted, corrupted, and existing data.
  • You can use the Filter feature to quickly locate the files of one kind, such as Pictures, Word, Excel, PDF, videos, emails, etc.
scan external hard drive

Step 3. Preview and recover data

  • Double-clicking a file from the scanned results to preview.
  • Choose the files you want and click "Recover".
  • Select a different drive to save the recovered files instead of the original one.

💡Tip: You can restore data on the local disks, external hard drives, and also the cloud storage.

preview and recover data

Download this data recovery tool today! Also, if you like this page, don't forget to share this with your mates on social media.


Solution 2. Recover Deleted Partitions with TestDisk

When a partition is eliminated, or it's corrupted, the filesystems remain on the disk, but their location is undisclosed as no such data can be examined. Therefore, TestDisk can rummage for the partitions and rewrite the partition table with the chosen partitions. The steps are the following:

Step 1. Create a recovery location for your data, such as "Recovery" in the "D:\" drive to employ as the retrieved file's destination.

Step 2. Launch the "testdisk_win.exe" file from the withdrawn TestDisk folder.

Launch testdisk_win.exe file

Step 3. The initial stage is to create a log file for the program. Hit the "Enter" button to opt for the first option and generate a log file.

Create a log file for the program

Step 4. Opt for the HDD you want to retrieve your partition from in the subsequent screen. You may use the "up and down" arrow keys to choose the options. Every four arrow keys need to be used in this program.

TestDisk will demonstrate every linked HDD and the partitions inside them. If you intend to recover deleted files using CMD, you may move to that drive and hit the "Enter" button to proceed next. But, if you wish to restore data from a whole disk, then the "disk option" must be used.

Step 5. TestDisk will quickly find out the partition type on your disk. Now, hit the "Enter" button.

Step 6. Assess the first option in the subsequent screen, and hit the "enter" button to kick-start verifying your disk.

Analyze the first option and hit the enter button

Step 7. Once the assessment is done, TestDisk will demonstrate errors based on your disk in the next window. The default chosen option will be "Quick Search." Now, hit the "enter" button.

Select quick search and hit enter

Step 8. Opt for files and folders which need to be recovered. Hit the "P" key to list the disk's content.

Step 9. TestDisk will now exhibit the "chose files" options at the window's bottom.

Step 10. Hit ":" to opt for the recent file, "a" to choose or deselect the files, "c" to copy the current file, and "C" to copy every selected file.

Step 11. TestDisk will instinctively navigate you to the directory from which it is being launched once you have chosen files or folders for restoration.

Step 12. Employ the arrow keys, such as forward and backward keys, to go to your retrieval location.

Step 13. Hit the "C" to retrieve the chosen files in this directory.

Step 14. Navigate to the "Recovery" folder built in Step 1.

Step 15. Hit the "Close" button to shut down the "TestDisk."

Bottom Line

While losing a partition on an external hard drive may seem disastrous, you can easily recover your essential files. You can retrieve your lost files using EaseUS Data Recovery Wizard effortlessly.

 Download for Win Recovery Rate 99.7%
 Download for Mac Trustpilot Rating 4.7

Recover Lost Partition on External Hard Drive Using CMD FAQs

Go through the FAQs below to retrieve lost partition on external HDD using CMD:

1. How do I fix a lost external hard drive partition?

You must follow the steps mentioned in part 2, fixing external HDD partitions using CMD.

2. How to recover external hard drive cmd?

Follow the steps below:

  • Connect the HDD with the system.
  • Type the command prompt and opt for "Run as Administrator."
  • Type chkdsk F: /f in the command prompt, and hit the "enter" button.
  • Type Y, and hit the "enter."
  • Type F, and hit the "enter" again.

3. How do I recover a lost hard drive partition?

In that case, you need to type "cmd" in the Windows search box, right-click the "command prompt" application, and opt for "run as administrator." Now, type the "chkdsk X: /f/r/x" command and replace "X" with the drive letter of the damaged partition. Finally, hit the "enter" button.

4. How to recover data lost by diskpart clean using cmd?

For this, you need to rely on your PC's EaseUS data recovery wizard and follow the steps.

  • Updated by

    Finley is interested in reading and writing articles about technical knowledge. Her articles mainly focus on file repair and data recovery.…
  • Written by

    Jaden is one of the editors of EaseUS, who focuses on topics concerning PCs and Mac data recovery. Jaden is committed to enhancing professional IT knowledge and writing abilities. She is always keen on new and intelligent products.…
Why Trust EaseUSEditor Reviews


Years of experience


Countries and regions

72 Million+


4.7 +

Trustpilot Score

Data Recovery Service