← All posts
·5 min read

Recovered files lost their names? How to sort and rename them

Publisher of DataRecover Pro

The recovery worked, and the result is a folder of recovered_0001.jpg, recovered_0002.jpg, or f1234567.jpg if it came from PhotoRec. Thousands of them, no folders, no dates you recognize. The files themselves are usually fine. What's missing was never inside them.

Why the names are gone

A file's name, its folder, and its dates are stored in the filesystem's directory, not in the file. The contents sit elsewhere on the disk. A deep scan finds contents by their signatures, the byte patterns at the start of a JPEG or an MP4, precisely because it doesn't depend on the directory. That is why it still works after a format. It is also why it can't know what anything was called.

Formatting, a corrupted directory, or enough time after deletion all remove the directory record while leaving the contents. The tool has to invent a name. DataRecover Pro numbers carved files from recovered_0001 up and gives each one the right extension; PhotoRec uses the sector number where the file started.

Get the real names back first

Before you rename anything, check whether the original names are still recoverable. Run a quick scan. It reads the filesystem instead of carving, so anything whose directory record survives comes back with its name and folder: IMG_1234.JPG inside the camera's own folder, not a number.

This works more often than people expect: for files that were deleted but not yet overwritten, for a card that is corrupted or won't mount, and sometimes after a quick format, when the old directory entries are still on the disk. Recover those first, then use the deep scan for whatever the quick scan didn't list. Both scans and the preview are free and need no account. Download DataRecover Pro.

Rebuild names from what's inside the files

For the rest, the useful information is in the files' own metadata. A photo records when it was taken, the camera, and the lens. A video records its creation time. A song has its title and artist in its tags. None of that depended on the filename.

Photos and videos are the easy case. Import the folder into Photos, Lightroom, or Capture One and it sorts by capture date; the filenames stop mattering. If you want the files themselves renamed, the free command-line tool exiftool does it in one pass. Install it with brew install exiftool, and work on a copy the first time.

exiftool '-FileName<DateTimeOriginal' -d '%Y-%m-%d_%H%M%S%%-c.%%e' /path/to/folder renames each photo to the moment it was taken, such as 2026-03-14_101502.jpg, and adds a counter when two shots share a second. For video, use CreateDate in place of DateTimeOriginal; video times are stored in UTC, so they can be off by your time zone. To sort into month folders instead, use exiftool '-Directory<DateTimeOriginal' -d '%Y/%Y-%m' /path/to/folder.

Documents and music carry less. A PDF or Word file often has a title in its metadata, which mdls -name kMDItemTitle file.pdf prints, and a music player reads artist and title from the tags as soon as you add the files. For anything else, Quick Look is the fastest way through a pile: select the first file in Finder, press Space, and use the arrow keys.

Sort in the results before you recover

You don't have to recover everything to find what you need. In DataRecover Pro's results you can filter by file type, sort by size, and open thumbnails and Quick Look for any file, all before paying. That is usually enough to pick out the hundred photos that matter from the thousands of cache images around them, and it keeps the recovered folder small enough to sort. If the small ones are all you see, read recovered photos are only thumbnails.

When this won't work

Original filenames that existed only in the directory, and are gone from it, can't be recovered by any tool; they were never stored anywhere else. Files with no internal metadata, such as plain text or screenshots stripped of EXIF, can only be told apart by opening them. And carved files don't keep their original modification dates, so sorting by date in Finder shows when they were recovered, not when they were made. Use the capture date from the metadata instead.

Lost a file? Get it back.

Scan and preview for free. See what's recoverable before you buy.

Download for macOS