Path: utzoo!attcan!uunet!mcvax!unido!nixpbe!ugun21!josef
From: josef@ugun21.UUCP
Newsgroups: comp.os.cpm
Subject: Re: Recovering Erased CP/M Files
Message-ID: <17700005@ugun21>
Date: 25 Nov 88 07:43:00 GMT
References: <6601@pucc.Princeton.EDU>
Lines: 43
Nf-ID: #R:pucc.Princeton.EDU:-660100:ugun21:17700005:000:1327
Nf-From: ugun21.UUCP!josef    Nov 25 08:43:00 1988


In his note, PKNIGHT@pucc.UUCP writes:

> Is there any way to recover erased files on a CP/M disk?  These are
> WordStar files on a diskette formatted in a Kaypro machine.

Ya bet there is!

If You look at the CP/M disk directory entry format:

uu   ff ii ll ee nn aa mm ee ee xx tt   ee 00 00 nn
||   |				    |   ||       ||
||   ^-- filename.ext --------------^   ||       ^^-- file size in sectors
||					^^-- extent
^^-- user area number or
  -- 0e5h if erased

aa aa aa aa  aa aa aa aa  aa aa aa aa  aa aa aa aa
|						 |
^-- allocation group numbers --------------------^

Note: The only difference between an unused and a used entry is the
user area field value.
If the file is erased, it is e5, if not, it is 0 <= uu <= 15 (or so).
(Of course, You must somehow take the free blocks into account)

There are a number of (PD) programs floating around that do the desired
unerasing.
BEWARE: You must not do anything after having ERAsed the files.

I have one, if You want to, I'll send it to You.
Send me Your e-mail address!

		Josef Moellers

	paper mail:			e-mail:
c/o Nixdorf Computer AG		USA:  uunet!linus!nixbur!nixpbe!mollers.pad
Abt. EG-3			!USA: mcvax!unido!nixpbe!mollers.pad
Unterer Frankfurter Weg
D-4790 Paderborn
tel.: (+49) 5251 104691

Standard disclaimer: Blablabla opinion blablabla employer blablabla!