• C

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
GILLYAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

GILLYAuthor Commented:
i would really appreciate it if anyone could help out i realise a knowledge beyond C is really neede but i am really stuck
GILLYAuthor Commented:
Adjusted points to 150
ozoCommented:
Files in what operating system?
Allowed by whom?
The 7 Worst Nightmares of a Sysadmin

Fear not! To defend your business’ IT systems we’re going to shine a light on the seven most sinister terrors that haunt sysadmins. That way you can be sure there’s nothing in your stack waiting to go bump in the night.

bing031398Commented:
Some operating systems do not have a facility for undeleting. I mean there is no way to undelete a file.
NexialCommented:
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.

alexoCommented:
Using assembly for UI is bad for your mental health.
braveheartCommented:
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.
GILLYAuthor Commented:
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
rmichelsCommented:
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.
braveheartCommented:
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.
cphCommented:
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
alexoCommented:
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.

GILLYAuthor Commented:
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!!!
alexoCommented:
It is customary to allow one of the participants (say the one who contributed most) to get the points.
bing031398Commented:
You got your help. Maybe its time to reward the person. THERE IS NO FREE LUNCH.
alexoCommented:
I think he does...  I'll ask Linda to drop him an email.
linda101698Commented:
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
GILLYAuthor Commented:
I am really sorry , i didn't realise the procedure, please forgive me
GILLYAuthor Commented:
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.
braveheartCommented:
Since you rejected my answer it would be difficult to give me the points. However, you could always accept this one insted.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
linda101698Commented:
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
GILLYAuthor Commented:
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
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
C

From novice to tech pro — start learning today.