
The TestDisk data recovery software does not have a graphical interface, and goes entirely through the command prompt. Its use is however much simpler than it seems.
Have you mistakenly deleted important files from your hard drive and don’t have another backup? Your files may not be completely gone. There are many software programs that allow you to recover deleted data from a storage medium, which is more or less easy to learn.
As data recovery is not a 100% safe science, not all missing files are always recoverable by different software. There is, however, a utility, TestDisk, which is often used as a last resort in attempting to recover deleted data. This program has the particularity of not having a graphical interface. It runs right in your computer’s command prompt, which can scare even less seasoned users out.
However, using TestDisk is relatively straightforward and does not require the user to enter complex code to retrieve data. Here is how to use TestDisk to recover your deleted data.
1. Download TestDisk & PhotoRec
First, download TestDisk & PhotoRec. These two tools open source allow to recover data and recover damaged or corrupt partitions. If TestDisk can recover all your data, PhotoRec specializes in image recovery.
Here we will take a look at TestDisk in order to understand how to use it to recover data deleted from USB drive from Windows PC. Note that the procedure may be slightly different depending on the file system used by the storage media from which you want to recover data.
Once the file has been downloaded to your machine, unzip it and open the directory containing all the files relating to the program.
Download TestDisk & PhotoRec for Windows (Free)
Download TestDisk & PhotoRec for macOS (Free)
Download TestDisk & PhotoRec for Linux (Free)
2. Create a backup directory
To store the files to be recovered, it is preferable to create an easily identifiable directory upstream. For simplicity, choose to create your backup directory in the one where the folder containing TestDisk is located.
If you have, for example, unzipped TestDisk in your My Documents directory, create your directory in My Documents. This will simplify your navigation when retrieving your files.
3. Run a deleted data scan with TestDisk
From the uncompressed directory, locate the testdisk_win.exe file and with a right click choose Run as administrator. A command prompt window should open on your machine.
Three choices are offered. Select Create and press Enter to create a new Log file. This file contains technical information about your storage medium and the operations that will be performed on it. It can be useful later in the event of a problem.

TestDisk should automatically detect all removable media connected to your machine and display their size. Select your USB key or hard drive using the up and down arrows on the keyboard, and verify that you are on Proceed using the left and right arrows.
Confirm your choice by pressing Enter to access the contents of the storage medium.

By default, TestDisk automatically detects the type of partition table used. Confirm by pressing the Enter key on your keyboard.

In the next window, TestDisk displays the partition of your storage medium, and offers several operations at the bottom of the window. Go to Undelete, and press the Enter key.

TestDisk displays a list of all deleted but recoverable items in red. You can see, in the center, the size of your files, their creation date and time, as well as the name of each file.

4. Copy your files
Using the up and down arrows on the keyboard, it is possible to explore the list of deleted items that TestDisk is able to recover.
To select a particular file, highlight it using the Up and Down arrows, and press the “:” key on your keyboard. To select all files, press the A button. Files selected for recovery are displayed in green.

Now that the erased files are selected, you need to copy them. To do this, simply press Shift + C to copy all the selected files, (the C key alone will only copy the highlighted file).
5. Recover your files
TestDisk displays a new window corresponding to the file explorer. This is where you will choose the directory where you will store the recovered files. Locate the Directory C: Users xxxx line.
The directional keys on the keyboard are used to navigate in the directories of your machine: Left and Right to go to the next or previous directory, Up and Down to navigate in the tree structure of your directories and files.
By default, TestDisk is placed in the directory uncompressed in step 1 “testdisk-7.1-WIP”.

Press the left arrow to navigate to the previous directory, then the Up and Down arrows to move to your backup directory. Press Enter to enter it.

To start recovering your files, press the C key on your keyboard. TestDisk automatically copies all files to the directory.
Depending on the amount of data to be recovered, the procedure may take longer or shorter.

When finished, TestDisk indicates in green the number of files which could be copied as well as the number of files which could not be saved.
Open your file explorer and check if the files were successfully recovered to your backup directory.