Re: undelete files

new topic     » goto parent     » topic index » view thread      » older message » newer message

On 14 Apr 2002, at 1:11, tone.skoda at siol.net wrote:

> 
> this is a little offtopic:
> how do i undelete files which were permanantely deleted in Windows?
> like you can delete file in windows by pressing SHIFT+DELETE?

You will need to call bios interrupts, specifying the drive sector, byte number 
etc.. read the fat, find the OldFileName entered as *ldFileName , and reset 
the * back to "O". Then it *could* magically reappear in a directory listing, 
with one huge caveat: if it's been overwritten by another file, it will be
mostly
trash, and rather unuseable. Norton Utilities for dos can do this, if you want 
to do it manually, it will present a list of deleted files and ask you to
provide
the first letter of the names for them, but no guarantee the files themselves 
were not already overwritten.

> here is a little more on topic question:
> how do i read all bytes (byte by byte in a loop) where disk free space?
> because
> data of those files must be somewhere on disk "free" space. those files were
> all
> .jpgs and all approximatlely same size, 800 Kb, so i thought if i could check
> header and if it is jpg read rest of data for file and restore it. my disk
> free
> space is 1.5 GB of 15GB.

To read then quick and dirty, build a FAT entry by calling bios entries, 
pointing to the free space. Then simply open it, and getc() the bytes. No 
guarantee the order of the free sectors will be correct tho.

Igor has prolly done this sorta thing already, if not, there are libs in the 
archives for dos calls, you could try to use them with bios calls. I suggest 
you *boot* to dos to use bios calls on a windows drive. How to do this in 
*nix, i duuno.

Kat

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu