[comp.sys.ibm.pc] Can a deleted directory be restored?

mguyott@mirror.TMC.COM (Marc Guyott) (09/13/88)

I know that files can be undeleted using the Norton Utilities.  However,
I deleted all of the files in a directory and then removed the directory.
Is there any way that I can restore the directory so that I can then
undelete the files using the Norton Utilities?  After I removed the directory
I powered my machine off, so I don't believe I've disturbed the FAT or any
other file system tables.  Any help will be appreciated.

                                                       Marc
----
       ... I never saw the morning until I stayed up all night ...
                            Claudia Schmidt

Marc Guyott                                         mguyott@mirror.TMC.COM
{mit-eddie, pyramid, harvard!wjh12, cca, datacube}!mirror!mguyott
Mirror Systems	Cambridge, MA  02140                617/661-0777

brown@nicmad.UUCP (Mr. Video) (09/13/88)

In article <17959@mirror.TMC.COM> mguyott@prism.TMC.COM (Marc Guyott) writes:
<I know that files can be undeleted using the Norton Utilities.  However,
<I deleted all of the files in a directory and then removed the directory.
<Is there any way that I can restore the directory so that I can then
<undelete the files using the Norton Utilities?  After I removed the directory
<I powered my machine off, so I don't believe I've disturbed the FAT or any
<other file system tables.  Any help will be appreciated.

Use Nortons to bring up the directory that contains the deleted directory.
Since it too is nothing but a file (of sorts), manually change the first letter
of the directory name.  If I remember correctly the remaining information
should still be there.

Save the changes and get out of Nortons.  You need to get DOS to see it,
so basically just look at it to make sure that it was recovered.  It, of
course, should be empty.

If the directory took up more than one sector, you will need to find the
other sectors of the directory are rebuild the FAT table.  Norton's Advanced
Edition 4.0 allows easy editing of the FAT table, no fuss no bother.  You
can use Nortons to look around to find the appropriate sectors.  Once you have
fixed up the FAT table, you need to save those changes (be sure to fix both
copies of the FAT).

Once you have done that, then you can use the un-erase feature of Nortons to
un-erase files.  I suggest that you un-erase files that are 1 cluster long
first.  This will help Norton find longer segmented files.  If it hard to
explain the ins and outs of directory structures and file layouts on the
disk, but every little bit helps.
-- 
	       harvard-\	 att--\
Mr. Video         ucbvax!uwvax!astroatc!nicmad!brown
	       rutgers-/      decvax--/
			      rolls--/

spolsky-avram@CS.YALE.EDU (Joel Spolsky) (09/14/88)

In article <17959@mirror.TMC.COM> mguyott@prism.TMC.COM (Marc Guyott) writes:
| I know that files can be undeleted using the Norton Utilities.  However,
| I deleted all of the files in a directory and then removed the directory.
| Is there any way that I can restore the directory so that I can then
| undelete the files using the Norton Utilities?  After I removed the directory
| I powered my machine off, so I don't believe I've disturbed the FAT or any
| other file system tables.  Any help will be appreciated.

You'd think this would be possible, wouldn't you ;-)

My version of Norton explicitly says "you can't restore removed
directories". I tried. Rats.

Joel Spolsky             bitnet: spolsky@yalecs     uucp: ...!yale!spolsky
Yale University          arpa:   spolsky@yale.edu   voicenet: 203-436-1483
You can't expect to wield supreme executive power just 'cause 
some watery tart threw a sword at you!!

tr@wind.bellcore.com (tom reingold) (09/14/88)

You can use the "edit sector" facility of Norton (or an equivalent,
such as debug) and change the first character of the deleted dir
name to something legal.  This will unerase it.  Look up how regular
files are deleted and undeleted and you will see how this works.

Tom Reingold
PAPERNET:                      |INTERNET:       tr@bellcore.bellcore.com
Bell Communications Research   |UUCP-NET:       bellcore!tr
445 South St room 2L350        |SOUNDNET:       (201) 829-4622 [work],
Morristown, NJ 07960-1910      |                (201) 287-2345 [home]

jsin@CS.UCLA.EDU (09/14/88)

In article <37741@yale-celray.yale.UUCP> spolsky@yale.edu (Joel Spolsky) writes:
>In article <17959@mirror.TMC.COM> mguyott@prism.TMC.COM (Marc Guyott) writes:
>| Is there any way that I can restore the directory so that I can then
>| undelete the files using the Norton Utilities?  After I removed the directory
>| I powered my machine off, so I don't believe I've disturbed the FAT or any
>| other file system tables.  Any help will be appreciated.
>
>My version of Norton explicitly says "you can't restore removed
>directories". I tried. Rats.
>
Pardon me, but isn't there a program "UD.EXE" which stands for Unremove
Directories?  This is in Norton's Advanced edition, 4.0; but I think
he had this in versions before that.  It's much better than mucking with 
the fat table.....

John (Jonghoon) Sin
UCLA SEASnet Facilities   InterNet: jsin@seas.ucla.edu
2567 Boelter Hall         UUCP:  ...!(uunet,ucbvax,rutgers)!seas.ucla.edu!jsin
Los Angeles, CA. 90024    VoiceNet: (213) 206-6864

Disclaimer: Above opinions are mine, all mine; they do not reflect the
opinions of any organizations/corporations/associations/institutions/etc.
other than myself, unless specifically stated as such.

brown@nicmad.UUCP (Mr. Video) (09/15/88)

In article <37741@yale-celray.yale.UUCP> spolsky@yale.edu (Joel Spolsky) writes:
<In article <17959@mirror.TMC.COM> mguyott@prism.TMC.COM (Marc Guyott) writes:
<| I know that files can be undeleted using the Norton Utilities.  However,
<| I deleted all of the files in a directory and then removed the directory.
<| Is there any way that I can restore the directory so that I can then
<| undelete the files using the Norton Utilities?  After I removed the directory
<| I powered my machine off, so I don't believe I've disturbed the FAT or any
<| other file system tables.  Any help will be appreciated.
<
<You'd think this would be possible, wouldn't you ;-)
<
<My version of Norton explicitly says "you can't restore removed
<directories". I tried. Rats.

As I indicated in a previous posting, it can be done.  Norton's just doesn't
have a utility to do it.  One must do it using the other tools provided.
But, it can be done.
-- 
	       harvard-\	 att--\
Mr. Video         ucbvax!uwvax!astroatc!nicmad!brown
	       rutgers-/      decvax--/
	INTERNET: astroatc.UUCP!nicmad!brown@spool.cs.wisc.edu

bturner@hpcvlx.HP.COM (Bill Turner) (09/15/88)

> I know that files can be undeleted using the Norton Utilities.  However,
> I deleted all of the files in a directory and then removed the directory.
> Is there any way that I can restore the directory so that I can then
> undelete the files using the Norton Utilities?

Yes.  You need to get into NU (can't use QU to undelete the directory) and
undelete the directory entry.  You'll need to do it manually, since the
directory entry contains no information about how large it is.  Add probable
clusters, verifying that they look like directory entries, until you come
to the end of the directory.  After saving that to disk, you can then
undelete the contents (NU undelete or QU).

--Bill Turner

pk-tle@nada.kth.se (Tommy Levitte) (09/15/88)

<In article <17959@mirror.TMC.COM> mguyott@prism.TMC.COM (Marc Guyott) writes:
<| I know that files can be undeleted using the Norton Utilities.  However,
<| I deleted all of the files in a directory and then removed the directory.
<| Is there any way that I can restore the directory so that I can then
<| undelete the files using the Norton Utilities?  After I removed the directory
<| I powered my machine off, so I don't believe I've disturbed the FAT or any
<| other file system tables.  Any help will be appreciated.
<
<You'd think this would be possible, wouldn't you ;-)
<
<My version of Norton explicitly says "you can't restore removed
<directories". I tried. Rats.
<

Oh yeah ? I have a norton utility UD.COM (stands for Undelete Directory) !
Works fine with me !!!





-- 
-------------------------------------------------------------------------------
Tommy Levitte (pk-tle@draken.nada.kth.se or gizmo@kicki.stacken.kth.se)
-------------------------------------------------------------------------------

psrc@poseidon.UUCP (Paul S. R. Chisholm) (09/15/88)

< "NO toon can resist the old shave-and-a-haircut gag!" >

In article <37741@yale-celray.yale.UUCP>, spolsky-avram@CS.YALE.EDU (Joel Spolsky) writes:
> In article <17959@mirror.TMC.COM> mguyott@prism.TMC.COM (Marc Guyott) writes:
> | I deleted all of the files in a directory and then removed the directory.
> | Is there any way that I can restore the directory so that I can then
> | undelete the files using the Norton Utilities?
> 
> You'd think this would be possible, wouldn't you ;-)
> My version of Norton explicitly says "you can't restore removed
> directories". I tried. Rats.

I haven't tried it, but when I pick Undelete from the PC Tools Deluxe
menu, it asks if I want to undelete files or directories.  (This is a
nice utility in general.  The main program has all the features you'd
expect, and can run as a TSR if you want.  There's also a disk cache, and
a backup/restore set of programs.)

Paul S. R. Chisholm, psrc@poseidon.att.com (formerly psc@lznv.att.com)
AT&T Bell Laboratories, att!poseidon!psrc, AT&T Mail !psrchisholm
I'm not speaking for the company, I'm just speaking my mind.

svirsky@ttidca.TTI.COM (Bill Svirsky) (09/15/88)

In article <37741@yale-celray.yale.UUCP> spolsky@yale.edu (Joel Spolsky) writes:
>In article <17959@mirror.TMC.COM> mguyott@prism.TMC.COM (Marc Guyott) writes:
>| I know that files can be undeleted using the Norton Utilities.  However,
>| I deleted all of the files in a directory and then removed the directory.
>| Is there any way that I can restore the directory so that I can then
>| undelete the files using the Norton Utilities?
>
>My version of Norton explicitly says "you can't restore removed
>directories". I tried. Rats.

PC Tools Deluxe has a Norton-like utility that can undelete directories
as well as files.  Depending on how badly you need the files you deleted
you may want to buy it.  It retails for about $70, but you can usually
get it from discount stores for about $50, or mail order for as little
as $40.  The disk also includes a nice, fast (about 1 Meg/minute) backup
program, a disk cache program, a file "packer" program that can also scan
your disk for bad sectors and mark them bad, and a program that creates a
copy of your FAT elsewhere on your disk so if you, or a virus, munge the
FAT, it can rebuild the FAT.  There are some other nice features also.
I've been using it for about 6 months now and, apart from a few minor
quirks, it's worked great.

-- 
Bill Svirsky, Citicorp+TTI, 3100 Ocean Park Blvd., Santa Monica, CA 90405
Work phone: 213-450-9111 x2597
svirsky@ttidca.tti.com | ...!{csun,psivax,rdlvax,retix}!ttidca!svirsky

ncsmith@ndsuvax.UUCP (Timothy Smith) (09/16/88)

In article <17959@mirror.TMC.COM> mguyott@prism.TMC.COM (Marc Guyott) writes:
> I know that files can be undeleted using the Norton Utilities.  However,
> I deleted all of the files in a directory and then removed the directory.
> Is there any way that I can restore the directory so that I can then
> undelete the files using the Norton Utilities?  After I removed the directory
> I powered my machine off, so I don't believe I've disturbed the FAT or any
> other file system tables.  Any help will be appreciated.

  You can use Norton to undelete directories but I don't think that you
can use the normal undelete file method.  The method that I use is as 
follows:

       select the directory that used to contain the deleted directory
           as your current file.

       using the feature that allows your to change data in the current
           file reinstate the directory.  This will require the use of
           the 'hex' mode, not the direc. or text mode.  When DOS deletes
           something from a directory it replaces the first character of
           the name of the entry with 'E5'.  What you need to do is replace
           the correct E5 with the first character of the deleted directories
           name.  As a check that you are replacing the correct E5 the 
           ASCII dump on the right of the screen will show the change as 
           you make it.  If you do it right when you toggle back to
           directory mode you will see the entry for the deleted directory
           with a complete name instead of being preceeded by a '?'. 
           After you save the change to the disk Norton's will treat the
           directory like any other directory and allow you to undelete
           your files.

      A word of warning, make sure that do this right before saving the
      changes, if you make a mistake in a directory you stand to lose a
      lot of data.  It would probably be best if you tried this out on
      a different machine and a floppy instead of on your hard disk.

       Tim Smith

PS.  I use nu version 3.10

marva@mntgfx.mentor.com (Marv Allenbrand) (09/17/88)

From article <504@poseidon.UUCP>, by psrc@poseidon.UUCP (Paul S. R. Chisholm):
> In article <37741@yale-celray.yale.UUCP>, spolsky-avram@CS.YALE.EDU (Joel Spolsky) writes:
>> In article <17959@mirror.TMC.COM> mguyott@prism.TMC.COM (Marc Guyott) writes:
>> | I deleted all of the files in a directory and then removed the directory.
>> | Is there any way that I can restore the directory so that I can then
>> | undelete the files using the Norton Utilities?
>> 
>> You'd think this would be possible, wouldn't you ;-)
>> My version of Norton explicitly says "you can't restore removed
>> directories". I tried. Rats.
> 
> I haven't tried it, but when I pick Undelete from the PC Tools Deluxe
> menu, it asks if I want to undelete files or directories. 
> 
PC Tools Deluxe will undelete a directory. I don't have the Norton Utilities, so
I'm afraid I don't know whether it has this capability.
-- 
Marv Allenbrand                        ...!tektronix!sequent!mntgfx!marva
Mentor Graphics Corp.                  marva@mntgfx.MENTOR.COM
(These are my opinions only and not those of Mentor Graphics Corp.)

pt@geovision.uucp (Paul Tomblin) (09/22/88)

Yes, you can recover files in removed directories.  My last version of
Norton (3.2??) said in the documentation that you couldn't recover
directories, but included a program UD that did it!  (It was mentioned
in the readme file)  It is now a legitimate part of Norton Advanced.
It worked for me (last year), as long as you haven't created any
files in the wrong places.

OK?

"Godel, Esher, Bach - Just say MU"


-- 
------------------------------------------------------------------------------
Paul Tomblin,  Department of Redundancy Department
    UUCP:   nrcaer!cognos!geovision ??
    Disclaimer: The opinions expressed here aren't necessarily even mine!

mg32+@andrew.cmu.edu (Michael Ginsberg) (09/25/88)

WELL, I guess no one out there has bought Norton Advanced Utilities.  Get it.
Completely menu driven, and guess what?  One of the programs is UD.  What is UD
you ask?  Undelete Directory.  And then of course you can use QU (quick
unerase) to go and get back all the files in the directory (assuming no other
files have replaces their locations, or you've done a SD (speed disk,
defragger...)

works like a charm...

--Michael Ginsberg
mg32+@andrew.cmu.edu