Link to home
Start Free TrialLog in
Avatar of GILLY
GILLY

asked on

Undelete utility

i have to design a graphical user interface for the following:
a)Allow a user to unerase a deleted file/directory
b)Allow a user to recover(as much as possible)deleted files which have been partially overwritten(automatic)
c)Allow a user to recover(as much as possible)deleted files which have been partially overwritten(Manual unerase)
I am allowed use a mix of C and assembly
Avatar of GILLY
GILLY

ASKER

i would really appreciate it if anyone could help out i realise a knowledge beyond C is really neede but i am really stuck
Avatar of GILLY

ASKER

Adjusted points to 150
Avatar of ozo
Files in what operating system?
Allowed by whom?
Some operating systems do not have a facility for undeleting. I mean there is no way to undelete a file.
Are you designing just the user interface to functions already in existence or are you also having to code the underlying functionality?   Your question sort of suggests that all you are interested in is the UI.

Using assembly for UI is bad for your mental health.
You have not mentioned which operating system you are using. If you are using DOS or Windoze you could write an interface to the existing undelete facility. However, if you are using UNIX, you will need to write your own utility which copies files to be deleted to some trash area, copies them back again to undelete, and some function to really delete the file or empty the trash area. So long as your trash area never fills up you will never overwrite files which have been deleted - but what are you going to do if you DO fill the disk.

You will only want to use an assembly language if you are having to interface with the guts of your machine - hey, maybe you are writing a File Management System?

For the UI I doubt if you will want to use assembly but maybe you should think about using or porting some existing toolkit.
Avatar of GILLY

ASKER

i am using the DOS operating system, i have to code my own functions to access the FAT and the sectors in the disk, i am not allowed use dos commands such as "undelete". Basically i have to write a program that finds for the user all the files that have been deleted you know this by the funny symbol at the start of the file name instead fo the first letter of the filename.  this is done by accesing the FAT on a disk, i only have to work on floppy's.  Does that make my question any easier to understand
Actually you need to access the directory entries NOT the fat to check for undeleted file. The directory is stored separately from the fat.  And..once you find a deleted file..you need to check to see if the FAT(s) it previously occupied, is once again in use.  Undelete utilities make some large assumptions in that they usually assume contiguous clusters.
So really, your question has very little to do with C and lots to do with DOS. Have you considered that your program may have to take into account different versions of DOS too.

I would have thought that, unless you are using a really old version of DOS that you could code everything in C using SVC calls rather than having to resort to assembler.
Have a look at saferv20.zip on any virtual software library (VSL) on the net.
ftp://garbo.uwasa.fi/pc/diskutil/saferv20.zip
or
ftp://sunsite.doc.ic.ac.uk/packages/simtelnet/msdos/diskutil/safera16.zip
Gilly, read a bit about FAT12, FAT16 and FAT32 structures.
Get DiskEdit from Norton Utils (or something similar) and spellunk the FAT of your disk.

Avatar of GILLY

ASKER

Thanks a million to everyone who tried to help me out, i realise it wasn't exactly a question about C but i will check out the web pages that you given me.
Thanks again, i will probably talk to you soon again!!!
It is customary to allow one of the participants (say the one who contributed most) to get the points.
You got your help. Maybe its time to reward the person. THERE IS NO FREE LUNCH.
I think he does...  I'll ask Linda to drop him an email.
Please post a comment asking the person who helped you the most (you choose) to post an answer so you can grade this question.

Linda Gardner
Customer Service @ Experts Exchange
Avatar of GILLY

ASKER

I am really sorry , i didn't realise the procedure, please forgive me
Avatar of GILLY

ASKER

I give the points to braveheart, i don't know actually how i am supposed to give them, if you don't get them, please tell me how.
ASKER CERTIFIED SOLUTION
Avatar of braveheart
braveheart

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Gilly,

Since braveheart now has the posted answer, all you need to do is choose the grade you want to award him to close this question and move it to the previously answered questions.  Thanks for reponding.

Linda
Avatar of GILLY

ASKER

tHANKS TO EVERYONE WHO HELPED ME OUT IF I COULD SPLIT THE POINTS I WOULD, HOPE I CAN RETURN THE FAVOUR, EXCEPT TO BING WHO I THINK IS A BIT IGNORANT FOR BEING SO RUDE TO ME WHEN IT WAS JUST BECAUSE I AM NEW AND DIDN'T KNOW THE PROCEDURE