Recovering deleted file on windows [closed]
Asked Answered
P

3

0

I want to write a program to recover recently deleted files on windows 7..

Is there a function in windows API that recover files? If not, how can I begin in that?

EDIT:
Or an open source project for that?

EDIT:
I do not mean Recycle Bin!!

Padauk answered 14/5, 2010 at 20:14 Comment(1)
Considering this is a built in and well known windows operation (the trashcan is on every desktop), I'm not exactly sure why an open source project would be warranted.Salutary
L
3

Well the file recovery tools all start by scanning the disk for file headers or for old traces of the file tree.

Looking to do this from scratch you need to understand your target drive and its file system. There is no API so to say, though there are projects that deal with accessing the NTFS file system directly from linux, though it sounds like you are developing in Windows. They are listed at the end of the Wiki link in my post. I have some links that will access the drive directly. From there you can t,ry to detect old files though any means you could derive from the NTFS Journal, Log or other component of the FS.

Assuming you want to use Windows 7 and will be running your program in the OS take a look these links:

  1. Direct Drive Access
  2. Create File
  3. Wikipedia Article on NTFS (The file system Windows 7 uses) Check the external links

What your looking to write is no trivial task, though that's what makes it interesting.

Lollis answered 14/5, 2010 at 20:44 Comment(0)
F
2

Do you mean files deleted (moved to trash) or removed from the hdd (marked for replacement)? If you're looking for the second option, I'm quite sure Windows do not offer any solution to that.

Flub answered 14/5, 2010 at 20:22 Comment(0)
D
2

You will have to analyze the data on the disk manually, i.e. by reading the raw disk content and looking for files which are marked as deleted. A good start would be reading into the internals of the filesystem(s) you want to support since you will need them. There is no API for that.

Dravidian answered 14/5, 2010 at 20:22 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.