Deleted file recovery program using C C++

Using PhotoRec to recover lost data
Forum rules
When asking for technical support:
- Search for posts on the same topic before posting a new question.
- Give clear, specific information in the title of your post.
- Include as many details as you can, MOST POSTS WILL GET ONLY ONE OR TWO ANSWERS.
- Post a follow up with a "Thank you" or "This worked!"
- When you learn something, use that knowledge to HELP ANOTHER USER LATER.
Before posting, please read
Post Reply
Posts: 2
Joined: 16 Jul 2019, 06:03

Deleted file recovery program using C C++

#1 Post by lisaly90 » 16 Jul 2019, 06:30

I want to write a program that can recover deleted files from hard drive ( FAT32/NTFS partition Windows).

I don't know where to start from. What should be the starting point of this? What should i read to pursue this?

Help is required.

Which system level structs should i study?

Sponsored links

User avatar
Site Admin
Posts: 4929
Joined: 18 Feb 2012, 15:08
Location: Le Perreux Sur Marne, France

Re: Deleted file recovery program using C C++

#2 Post by cgrenier » 17 Jul 2019, 06:02

PhotoRec is using file header to identify the beginning of files and recover them.
TestDisk knows about the filesystems internal to recover files from exFAT, FAT32, NTFS... to recover them with their original filenames.
You can learn about the two method by reading the source code.
As TestDisk and PhotoRec are under GNU GPL 2 or later license, if you "borrow" source code from one of the programs, your program need to be under the same license.

Posts: 290
Joined: 04 Jan 2019, 09:48
Location: Hannover, Deutschland (Germany, Allemagne)

Re: Deleted file recovery program using C C++

#3 Post by recuperation » 17 Jul 2019, 06:29

Start with FAT(32) because it is the easiest one.

Search for:

Microsoft Extensible Firmware Initiative FAT32 File System Specification
FAT: General Overview of On-Disk Format

Version 1.03, December 6, 2000
Microsoft Corporation

My personal favorite is an old article in German language from the German computer magazine labeled "c't".
You an buy the article here:

It covers the old MBR-style partitioning scheme as well.
There is another article that applies to ext2-structures in this issue of the magazine - has to be purchased separately.

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 1 guest