Learn how to use PhotoRec to recover files from hard drives and SD cards. This guide covers PhotoRec file recovery, SD card recovery, its limitations, and an easier Windows alternative.
Accidentally deleting important files and emptying Recycle Bin? Whether you lost photos, videos, documents, or other files from a hard drive, USB drive, or memory card, data recovery software may help retrieve them. Among the most popular free tools is PhotoRec, an open-source data carving utility created by CGSecurity.
Operating beneath the file system layer, PhotoRec bypasses corrupted file structures to retrieve lost data directly from raw storage sectors. If you are searching for how to use PhotoRec to recover files, here is a detailed guide.
If you have lost important files, stop using the affected storage device whenever possible. Continued use may overwrite the deleted data and reduce the chances of successful recovery.
PhotoRec relies on file carving - scanning storage media for known file headers and footers (signatures) rather than relying on file allocation tables. Because it features a command-line text interface, navigating it requires step-by-step precision.
Step 1. Download and Launch PhotoRec
First, download PhotoRec from the official CGSecurity TestDisk project. PhotoRec is generally distributed together with TestDisk. Then, locate the PhotoRec executable for your operating system. For Windows users, the executable may have a name similar to photorec_win.exe.
Step 2. Select the Drive Containing the Lost Files
Open the PhotoRec executable. Unlike most Windows applications, PhotoRec may open in a command-line-style interface. You typically navigate through the program using your keyboard:
Step 3. Choose Partition and Search Settings
Select the disk or storage device where your missing files were originally stored. If your partition structure is severely damaged or missing, select [Whole disk]. You can enter [File Opt] to filter for specific file extensions like JPG, PDF, MP4, or go directly to [Search].
If you are unsure which drive contains your files, check the drive's capacity and compare it with the storage device shown in Windows File Explorer.
Step 4. Choose File System Type
PhotoRec may ask you to specify the file system family. For many Windows storage devices using NTFS, FAT, or exFAT, you should carefully read the descriptions displayed by PhotoRec before making a selection. Choosing the wrong option can affect the recovery scan.
Select [ ext2/ext3/ext4 ] for Linux file systems.
Select [ Other ] for Windows and flash storage file systems (NTFS, FAT32, exFAT).
Step 5. Set Search Scope and Destination Path
Choose [ Free ] to scan unallocated space for deleted files, or [ Whole ] to carve the entire partition. If you only deleted files and the storage device is otherwise functioning normally, scanning free space may be sufficient and may complete faster.
Next, select a folder where PhotoRec should save the recovered files. Important: Do not save the recovered files back to the same drive or partition where they were lost. Press C to start file carving. For example:
SD cards and MicroSD cards used in digital cameras, smartphones, and handheld consoles are susceptible to file system corruption, improper removal, or accidental formatting. PhotoRec is highly effective at extracting photos and videos from formatted memory cards.
Step 1. Insert the SD card into a card reader attached directly to your computer. Avoid performing recovery through cameras or smartphones via MTP mode.
Step 2. Launch PhotoRec as Administrator. Identify your SD card from the drive list using its drive capacity (e.g., 32 GB, 64 GB, 128 GB) and press Enter.
Step 3. Choose [ Other ] (since most SD cards use FAT32 or exFAT). Select a folder on your computer's internal storage drive as the save destination (never save files back onto the SD card). Press C to launch data recovery.
While PhotoRec is free and powerful, its signature-carving architecture introduces several technical limitations compared to commercial software:
Loss of Original Filenames and Directory Tree: PhotoRec ignores file system metadata. All recovered files receive generic names (e.g., f0123456.jpg) and are grouped into folders like recup_dir.1, requiring manual sorting.
No Pre-Recovery File Preview: Users cannot preview images, documents, or video files prior to recovery, forcing users to dump all carved data to disk.
Command-Line Interface (CLI): The text-based command interface can feel complex and intimidating for non-technical users.
Severe Fragmentation Vulnerability: Fragmented files (data split across non-contiguous memory sectors) often recover corrupted or incomplete because signature carving relies on continuous block reading.
Massive Target Storage Demand: Because you cannot select individual files to recover upfront, PhotoRec extracts every matching file signature found on the drive, demanding substantial target disk capacity.
If PhotoRec's command-line interface feels too complex or if you need to restore lost files with their original filenames and folder structure intact, using a modern GUI tool like AOMEI FastRecovery is a recommended alternative.
Step 1. Launch AOMEI FastRecovery, choose Deleted Files Recovery. To recover files from SD card, you can choose USB/SD Card Recovery.
Step 2. Select the partition or drive where data was lost, and click Scan. The tool will run Quick Scan automatically. If there are no target files, you may run Deep Scan instead.
Step 3. Browse through scan results organized by original folder paths. Filter by file type or use the search bar to locate specific files and preview them.
Step 4. Select the files you want to retrieve, click Recover, and choose a safe location to save them.
#1. Can PhotoRec recover video?
Yes, PhotoRec supports a wide range of video formats, including MP4, MOV, AVI, MKV, and WMV. However, because video files are often large and heavily fragmented on storage drives, signature carving may occasionally yield corrupted, unplayable videos if data blocks are scattered non-contiguously.
#2. Can PhotoRec recover documents?
Yes, PhotoRec can recover over 480 file extensions, including common document formats such as Microsoft Word (DOC/DOCX), Excel (XLS/XLSX), PowerPoint (PPT/PPTX), PDF, ZIP, and plain text files (TXT).
#3. Where does PhotoRec store recovered files?
PhotoRec saves all recovered files into automatically generated output folders named recup_dir.1, recup_dir.2, etc., within the directory path you selected during Step 5 of the recovery process. It never writes back to the original drive being scanned to avoid overwriting data.
Learning how to use PhotoRec to recover files can be useful when important data has been accidentally deleted, an SD card has been formatted, or a storage device has experienced file system problems.
PhotoRec is free and capable, but its text-based interface and signature-based recovery approach can make the process challenging for beginners. In addition, recovered files may lose their original names and folder structure. If you are comfortable working with technical disk and partition options, PhotoRec can be a valuable recovery tool. However, if you prefer a more intuitive Windows experience, AOMEI FastRecovery offers an easier alternative with a graphical interface, file filtering, and a streamlined PC & SD card data recovery process.
Regardless of the tool you choose, remember the most important rule after data loss: stop using the affected storage device as soon as possible. Acting quickly can improve the chances of recovering your important files.