Coox,

Do you know how to write in assembly language? The reason I ask is that in order to recover a deleted file the way Norton Unerase did, you will need to use very low level (sector level) disk IO routines that are not available in Visual Basic.

When a file is deleted, the first character of its name in the directory entry is set to Hex value of E5. Then all the FAT entries for the file are set to Null--just as Yonanta described. Since the directory entry is basically still intact, which still contains a reference to the file's first FAT entry, an undelete utility can be written to somehow rebuild the FAT chain from this information--as long as the disk clusters the file once occupied have not been overwritten by another file.

So the answer to your question is that you can't do it with VB alone--you'll need to somehow access the BIOS's Interrupt 25H and 26H routines for sector level disk access.

Gerald M.

*Update* I was doing some further reading on this topic and learned that the interrupts mentioned above are not supported in Windows protected mode.


[This message has been edited by Gerald (edited 12-11-1999).]