PhotoRec Recovery: How to Use It & Best Alternatives
In this article
PhotoRec can recover deleted or lost files from hard drives, memory cards, and USB sticks by scanning raw disk data, bypassing the file system. The best alternative, DMDE, offers faster recovery, deeper file system analysis, and a more user-friendly interface while supporting the same range of storage devices and file types. Both tools work without requiring prior backups, but success depends on avoiding further disk writes after data loss.
What You'll Need
- A computer with administrative access
- PhotoRec or DMDE software (both free for basic use)
- The storage device from which files are to be recovered
- A second drive or USB stick with enough space to store recovered files (recommended)
- A working internet connection (for downloading the tools)
- Optional: Disk imaging tool like dd (for advanced users)
Step-by-Step
- Download PhotoRec from the official CGSecurity website. It’s part of the TestDisk package. Extract the archive to a folder on your computer. Do not install it on the same drive you’re recovering from.
- Connect the storage device (e.g., USB drive, memory card via card reader) to your computer. Avoid writing any new data to it.
- Run PhotoRec. On Windows, double-click
photorec_win.exe. On Linux or macOS, open a terminal and navigate to the extracted folder, then run./photorec. - Select the physical drive to scan. PhotoRec shows all connected storage devices by model and size. Use arrow keys to highlight the correct one and press Enter.
- Choose the partition type. If the drive was previously formatted, select the file system (e.g., Intel for NTFS/FAT, Mac for HFS+). If unsure, choose Intel for most Windows drives.
- Select the partition to analyze. Choose Whole disk if the partition table is damaged or missing. Otherwise, select the specific partition.
- Choose the file system type. PhotoRec defaults to Other for raw file carving. To improve accuracy, select the actual file system (e.g., FAT32, NTFS, ext4) if known.
- Select the destination folder for recovered files. This must be on a different drive. Never save recovered data to the same device being scanned, as it risks overwriting lost files.
- Start the search. PhotoRec scans block by block, looking for file headers and footers. This can take minutes to hours depending on drive size.
- Review recovered files. PhotoRec saves files in folders by type (e.g., jpg, pdf). Filenames are often lost; you’ll need to manually check content.
- For DMDE, download from the official website. Run
dmde.exeon Windows. The interface shows all drives and partitions. - Select the drive, then click Browse Objects. DMDE reads the file system directly, showing deleted files with a cross mark.
- Right-click the deleted file or folder and choose Copy to. Select a destination on another drive.
- DMDE recovers filenames and folder structure when possible, unlike PhotoRec’s file carving approach.
- After recovery, verify file integrity by opening a sample of documents, images, and videos.
Common Mistakes
Not stopping disk usage immediately after data loss is the most critical error. Any new write can overwrite deleted files. Another mistake is running PhotoRec from or saving output to the same drive, which risks permanent data loss. Users often skip verifying the correct drive selection, leading to scanning the wrong device. Some assume PhotoRec recovers filenames accurately, but it typically does not—manual review is required. Skipping file system selection reduces recovery precision. Finally, interrupting the scan before completion may result in incomplete recovery.Tips
Always create a disk image first using tools like dd or DMDE’s built-in imaging if the drive is failing or unstable. This protects the original data. Use DMDE when the file system is intact but files are deleted—it preserves names and paths. Use PhotoRec when the partition table is corrupted or the drive isn’t recognized by the OS. Filter recovery by file type in DMDE to speed up results. On large drives, start with a quick scan in DMDE before a full raw recovery. Label recovered folders clearly (e.g., by date and source) to avoid confusion. For SSDs, recovery is less reliable due to TRIM—act quickly.Troubleshooting
If PhotoRec doesn’t detect the drive, ensure it’s properly connected and recognized in Disk Management (Windows) orlsblk (Linux). Try a different USB port or card reader. If the scan fails mid-process, the drive may be failing—stop and image it. If recovered files won’t open, they may be fragmented or partially overwritten; try alternative recovery tools. In DMDE, if deleted files aren’t visible, switch to Full Analysis mode. If both tools fail, the data may have been overwritten or encrypted (e.g., BitLocker). Never format a drive before attempting recovery. If the system freezes during scan, close other apps and retry with fewer background processes. For encrypted drives, recovery is only possible if the key is available.