[comp.sys.mac] Folders from Hell

heath@gpu.utcs.utoronto.ca (Todd Heatherton) (05/15/89)

One of our mac users has been plagued with this bizarre problem.  She
has an SE, a 40 meg FX drive and tape backup.  She is running a number
of different inits (about eight total) and system 6.  While backing up
her hard disk she noticed a folder which contains five other folders.
She can open the first folder but cannot open the other folders (gets
this strange in use message).  She also cannot throw the folders out 
(she gets a Folder not Empty message).  She can rename the folders and
move them around--but they refuse to die.  If she copies the folders to
a floppy, she can see that there is nothing in the folders and can throw 
them out.  Further, if she boots off a floppy and then tries to throw out
the folders, she still cannot get rid of them.  Any advice or help?


-- 

************************************************************************
Todd Heatherton     Department of Psychology     University of Toronto

Phone:  416-978-6387 (office)       Email:  heath@gpu.utcs.utoronto.ca
        416-482-4847 (home)                 or heath@psych.utoronto.ca
************************************************************************

twakeman@hpcea.CE.HP.COM (Teriann Wakeman) (05/17/89)

HMMM.... If there were invisible applications/documents in the folders
you would not be able to see them if you looked, and they would not be
copied in a finder copy. Your friend might want to use the MacTools
utility that comes with Copy II Mac. This would show any invisible files
and allow you do delete them.  Worth a try.

You did not mention if you had AntiToxin INIT. IF you have that INIT AND
if you had a virus attached to the folders then you would get a App missing
or in use message. Only problem is I do not think a virus can attach itself
to a folder.

Try Copy II Mac.   TeriAnn

alexis@ccnysci.UUCP (Alexis Rosen) (05/27/89)

Sounds like a case of your directory sturcture being corrupted. The Folders
that Won't Die have a valence greater than zero even though there aren't
any files in them. There is a way to fix this, and I don't know how to do
it offhand. It would require some very careful perusal of Inside Mac Vol. 4
to figure out how to fix it.

I'd suggest that you back things up file-by-file and reformat the disk. That's
not a bad idea every once in a while anyway.

---
Alexis Rosen
alexis@ccnysci.{uucp,bitnet}
alexis@rascal.ics.utexas.edu  (last resort)

macak@lakesys.UUCP (James Macak) (05/28/89)

In article <2096@ccnysci.UUCP> alexis@ccnysci.UUCP (Alexis Rosen) writes:
>
>Sounds like a case of your directory sturcture being corrupted. The Folders
>that Won't Die have a valence greater than zero even though there aren't
>any files in them. There is a way to fix this, and I don't know how to do
>it offhand. It would require some very careful perusal of Inside Mac Vol. 4
>to figure out how to fix it.
>
>I'd suggest that you back things up file-by-file and reformat the disk. That's
>not a bad idea every once in a while anyway.

There was a discussion of this problem on FidoNet's EchoMac a few months ago.
I saved a couple of messages from it and put them to use when I ran into an
undeletable folder.  I followed the directions and after a bit of
experimenting I succeeded in dragging the problematic folder into the trash
and getting rid of it.

As the messages note, the directory information for a folder can seemingly get
munged on occasion, making the Mac OS think that there are files in the folder
even when it is empty.  Alexis notes the the valence for the folders is
greater than zero but a negative valence can also apparently cause the
problem.

I mailed this info to the person who posted the original article, and am
supplying it here as this seems to be an occasional problem and the methods
described below not only work but are much less troublesome than reformatting
and recreating your whole hard disk.

Please note I am _not_ supporting the methods described below as a universal
cure for this problem... I certainly have not done any testing other than to
apply the methods (and quite successfully) to my "Folder From Hell"
experience.

Jim



From:    Chuck Shotton 
To:      Andy Shaw                                Msg #383, 31-Jan-89 08:31am
Subject: Re: RE:help! Undeletable Fold

I posted a message about getting rid of undeletable folders a few days ago,
but I'll repeat the main points. The undeletable folders usually pop up when
running Multifinder, but there is a definite bug somewhere in the bowels of
Finder itself that causes folders to end up with a file count that is non-zero
(positive or negative) when the folder is really empty.

The easy way out of this problem is to take a tool like FEdit or MacSnoop and
set the count in the directory to zero. If you're not familiar with the
directory structure, play around with a floppy first by making a folder or
two, putting a known number of files in each one, and then searching the disk
for these values.

The easiest way to find the correct area on the disk is to search for the
folder name first, then look for the file count number. Once you get this
technique down on a floppy, just do the same thing for your undeletable folder
on your hard disk. You'll know the proper offset from the name field, so it
shouldn't be hard to find the right bytes. Remember what the original byte(s)
were that you changed, in case you screw up. Besides, you probably won't be
any worse off after the edit than before, given that the folder is trashed
already.

I've used this technique successfully on 4 "empty" folders which contained 3,
-1, -6, and -2 files respectively. After setting the file count to zero, all
were deletable. One word of caution. Make ABSOLUTELY sure that there are no
hidden (off the screen) or invisible files in the folder before you set the
count to zero.
             Chuck
---
 * Origin: Brain In A Pan, Houston TX, (713) 480-7422. Mac Developers Here!
(Opus 1:106/260)


From:    Steve Zopfi 
To:      Andy Shaw                                Msg #445, 31-Jan-89 03:14pm
Subject: RE:help! Undeletable Fold

I finally found out how to destroy it.  First rename the folder something like
FolderFromHell to distinguish it from the rest of your desktop.  Open up the
Volume using MacSnoop.  Search the  disk for FolderFromHell (there may be
multiple occourances).  In the hex section of the window  you will see a
string that looks something like this:

0000 0100 XXXX where XXXX contains the number of files in the folder in Hex.
Change XXXX to 0000.  Make sure you do this to all occurances of
FolderFromHell.  Write the Block to the disk.  Go back to the desktop and
trash the folder and empty.  It should go away.  I am not sure what caused the
problem originally.  I believe it was linked to the power going out during a
download from a BBS.  Yours may have happened the same during a Disk I/O in
Sum or whatever if the power Glitched.  Good luck and let me know if it works.


--- Tabby/Mansion 1.8
 * Origin: Sea/Mac  *Mansion/Tabby* (206-725-6629) HST (1:343/31)



-- 

macak@lakesys.UUCP (James Macak) or lakesys!macak@csd1.milw.wisc.edu

hodas@eniac.seas.upenn.edu (Josh Hodas) (05/28/89)

In article <2096@ccnysci.UUCP> alexis@ccnysci.UUCP (Alexis Rosen) writes:
>
>Sounds like a case of your directory sturcture being corrupted. The Folders
>that Won't Die have a valence greater than zero even though there aren't
>any files in them. There is a way to fix this, and I don't know how to do
>it offhand. It would require some very careful perusal of Inside Mac Vol. 4
>to figure out how to fix it.
>
>I'd suggest that you back things up file-by-file and reformat the disk. That's
>not a bad idea every once in a while anyway.

Actually, in the times I have encountered this problem, the problem was a 
valence of less than zero (typically -1).  Apparently a negative valence
is automatically displayed as "0 items" in the finder window, but does show 
up in an attempt to trash the folder.  I have forced the folders to be trash-
able by putting a dummy file into them, thus making the screwed up valence 1.

Note though, that while the folder may go away, the directory structure is
probably still screwed (I have had Disk First Aid say "unable to verify disk"
after such operations) and it may still be best to back-up and reformat as 
Alexis reccomends.

Josh


-------------------------

Josh Hodas    (hodas@eniac.seas.upenn.edu)
4223 Pine Street
Philadelphia, PA 19104

(215) 222-7112   (home)
(215) 898-5423   (school office)