TechBuzzPro

Can PhotoRec Recover Deleted File Names?

· 4 min read · Apps & Browsers

In this article
  1. How PhotoRec Works
  2. Why File Names Are Lost
  3. How to Recover Original Names
  4. Common Problems and Workarounds
  5. PhotoRec vs. Other Tools
  6. Cost and Safety Considerations
  7. Alternatives That Preserve Names
  8. Frequently Asked Questions

PhotoRec does not recover original file names. It scans raw data and restores files with generic names like f1234567.jpg, because it works by signature rather than filesystem metadata. This article explains why that happens, what you can do about it, and how to get your names back.

How PhotoRec Works

PhotoRec is a free, open-source data recovery tool developed by Christophe Grenier and distributed by CGSecurity. Unlike many recovery programs that read the filesystem’s directory structure, PhotoRec performs a carve: it scans the raw disk sector by sector, looking for known file signatures (headers and footers) such as FF D8 FF for JPEG or %PDF for PDF. When it finds a signature, it copies the following data until it hits the file’s end marker or a size limit.

Because it ignores the filesystem, it never sees the directory entries that link a file to its name, path, or timestamps. That is why the recovered files are named f0000001.jpg, f0000002.png, and so on, in the order they were found on the disk.

Why File Names Are Lost

File names live in the filesystem’s metadata—the Master File Table (NTFS), inode table (ext4), or catalog (FAT). When you delete a file, the OS typically marks that metadata as free but leaves the data blocks intact. PhotoRec bypasses that metadata entirely, so it cannot read the original name even if the metadata still exists.

There is one exception: if you recover from a filesystem that PhotoRec can parse (like FAT or NTFS) and the metadata is still intact, you might see a lost+found or a directory structure. But in most cases, especially after formatting or partition loss, the metadata is gone or overwritten.

How to Recover Original Names

If preserving names matters, use a tool that works at the filesystem level first. TestDisk (PhotoRec’s companion) can repair partition tables and recover deleted files with names if the metadata is intact. Other tools like R-Studio, EaseUS, or DMDE also read metadata. The general rule:

  • If the filesystem is intact but files were deleted, use a filesystem-based recovery tool to get names.
  • If the filesystem is corrupted or formatted, PhotoRec is your best shot, but you will lose names.
  • If you have a backup of the directory listing (e.g., from a previous sync), you can rename files after recovery.

Common Problems and Workarounds

Users often ask if they can manually rename recovered files. Yes, but it is tedious. For photos, you can use EXIF data to reconstruct dates and camera info. Tools like exiftool can batch-rename based on metadata. For documents, you may need to open each file and rename it manually.

Another issue: PhotoRec does not preserve the original folder structure. All files land in a single recup_dir folder. You can mitigate this by running PhotoRec on a per-partition basis and sorting by file type afterward.

PhotoRec vs. Other Tools

PhotoRec is not the only recovery tool, but it is one of the few that is free and cross-platform. Here is a quick comparison:

  • PhotoRec – Free, open-source, recovers by signature, no names.
  • TestDisk – Free, recovers deleted files with names if metadata is intact.
  • R-Studio – Paid, reads metadata, preserves names and structure.
  • Recuva – Free/paid, Windows-only, easier GUI, but less thorough on damaged disks.

Choose PhotoRec when the disk is badly damaged or formatted; choose a metadata-based tool when you need names and the filesystem is still readable.

Cost and Safety Considerations

PhotoRec is completely free, with no hidden costs. However, the real cost is time and effort: you will spend hours renaming files. Safety-wise, you must never install PhotoRec on the drive you are recovering from, and you should save recovered files to a different drive. Writing new data to the source drive can overwrite the very blocks you are trying to recover.

Alternatives That Preserve Names

If you absolutely need original names, consider these approaches:

  • Use a filesystem-level recovery tool before resorting to carving.
  • If you have a recent backup, restore from it instead of recovering.
  • For photos, use EXIF-based renaming to at least get dates and camera models.
  • If the disk is an SSD, be aware that TRIM may have already erased the data blocks, making recovery impossible.

Frequently Asked Questions

Can PhotoRec recover deleted file names from an NTFS drive?

No. PhotoRec ignores NTFS metadata, so it cannot recover names. If the NTFS Master File Table is intact, TestDisk or a commercial tool can recover names, but PhotoRec itself will not.

Why does PhotoRec name files like f1234567.jpg?

Those are sequential numbers assigned in the order the files are found during the scan. The number has no relation to the original file; it is just a counter.

Is there a way to get original names from PhotoRec output?

Not directly. You can manually rename files, or if you have a backup of the directory listing, you can match files by size and date to rename them. For photos, EXIF data helps.

Does PhotoRec work on SSDs?

It can, but SSDs use TRIM, which permanently erases deleted data blocks. If TRIM has run, PhotoRec will find nothing. For SSDs, you need a backup or a tool that works before TRIM.

Can I recover names if I formatted the drive?

Formatting usually rebuilds the filesystem and may overwrite metadata. PhotoRec can still recover files by signature, but names are almost certainly gone. A filesystem-level tool might recover names if the format was quick and the metadata was not overwritten.