Computing.Net > Forums > Programming > write a program to

Computing.Net: Over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to sign up now, it's free!

write a program to

Reply to Message Icon

Original Message
Name: Khai
Date: May 19, 2002 at 02:55:47 Pacific
Subject: write a program to
Comment:

I am a student (in Vietnam) who is learing DOS Programming Windows 16 bit and 32
bit. I have an exercise which is written by Assembly code "write a program to
Undelete files as DOS command".It is so difficult that I can not complete it in
this month. So, would you please help me do it and send the source code of the
exercise to me.
Please help me to complete the course.


Report Offensive Message For Removal


Response Number 1
Name: cup
Date: May 28, 2002 at 03:20:37 Pacific
Reply: (edit)

I don't have a program for you but here are a few pointers.

The problem with DOS is that it puts a dummy character in the FAT when deleting the file. You have to match the remaining characters of the filename with that of the file you are trying to undelete.

If there is only one match, it is not a problem. If there is more than one match, you have to ask the user which one it is: give the date as well. The date can be picked up with the filename data from the FAT.

Once you have found the filename, find the starting block and go through all the blocks to see if they are all deallocated. If any are allocated then the file cannot be undeleted. If they are all deallocated, then just go through reallocating them.

Best test this on a floppy: you don't want to mess up your hard disk by corrupting the FAT.


Report Offensive Follow Up For Removal







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home








Do you have your own blog?

Yes
No
I did before
I will soon


View Results

Poll Finishes In 4 Days.
Discuss in The Lounge
Poll History




Data Recovery Software