CASE HISTORY #1
 by The Disk Doctor


--------------------------------------------
Copyright (C) 1987,  the Disk Doctor.

First published in the Rochester (PC)^3 News:
  Picture City PC Programming Club
  PO BOX 20342
  Rochester, NY 14602
The Disk Doctor may be contacted at this
address, or via CIS [73147,414].

This material may be reproduced for internal
use by other not-for-profit groups, provided
this copyright notice is included.
----------------------------------------------


8:10pm
   I was reading a book at home,
minding my own business, when I heard
a frantic squeal come from the other
room, "Oh my gosh, what happened to
my file!?"  This was my first clue
that something was wrong.  My wife,
an avid word-processorer, was
repeatedly doing a directory on the
same disk. This was my second clue.
When she turned to me with tears in
her eyes and said she accidently
erased her file, I knew this was
+a job for...  the Disk Doctor.



8:11pm
The Doctor's first words to the
victim, "Calm down, dear.  Let's see
what we have here.  Can you tell me
what happened?"

"I was cleaning up some old files and
I did a DEL on the wrong file!  How
could I be so careless!"

"Now, don't blame yourself.  It could
happen to anyone.  Tell me exactly
what you did when you noticed the
problem."

"Just a DIR, that's all."

"You were wise to come to me right
away.  There's a good chance we get
your file back."

"Hurry, Doctor!"



8:12pm
The Doctor took the ailing disk in his
skilled hands.  "The first thing I
always do is to make an exact copy of
the specimen, using the DOS Diskcopy
command.  That way, we can always
resurrect the original if something
goes wrong."


"Gasp..."

"Don't worry.  I've done this
operation many times before.  You see,
every disk has a directory, which
lists the name and useful information
on the file.  When you go to access a
file, the directory tells DOS where to
find the starting sector."

"Like a Table of Contents."

"Exactly.  When you erase a file, DOS
doesn't bother to go thru and wipe out
the data sectors.  All it does is mark
these sectors as available space. The
data is still there, but you can't get
do it."

"What if another file needs the
space?"

"Then the data gets overwritten.  Or
even worse, if you copy or create a
new file on to the disk, the directory
information will be lost."

"Then you'd never get the file back."

"Well, let's just say it becomes a lot
harder."



8:15pm
The Doctor reached for the DOS manual.
"What are you looking up, now?  I
thought you knew what you were doing!"

"I need the DOS Supplemental Programs
disk, my dear, to bring back your
file."

"You mean there's a DOS command to
unerase files?"

"No.  But the DEBUG program gives me
all the tools I need for this minor
operation.  I just need to read in the
Directory, like so..."


"Look!  There's my file.  How come the
first letter looks like an 'o'?"

"It's a sigma. That's how DOS marks
the directory entry as erased.  I'll
just restore the first letter, then
save this back on the disk.  Now let
me rebuild the File Allocation Table
and you'll be back in business.  That's
sector number 2. ..."



8:38pm
"There.  It worked.  You're all set."

"I can't believe it!  You're a miracle
worker."

"No, DOS works the miracles.  My
hands only press the keys."