[comp.sys.mac] My machine is possessed - Folder from Hell

yang@mist.cs.orst.edu (Sherry Yang) (02/07/90)

I am not sure if this subject has been discussed on the net before or not, but
I have discovered this problem recently and hope someone out there can help me.
We have discovered a folder on one of the MacIIs in our lab that has nothing 
in it, but it will not let us throw it away.  It kept coming back with a 
"File busy or folder not empty" message.  ResEdit and MacTools don't do the 
trick either. Does any of you have any ideas on how we can throw the possessed 
folder away?  Until then, it's appropriately named "Satan" on the harddisk.  

Thanks advance for your help,

Sherry
yang@mist.CS.ORST.EDU

Computer Science Department
Oregon State University

rich@ultra.com (Rich Fall) (02/07/90)

yang@mist.cs.orst.edu (Sherry Yang) writes:

>I am not sure if this subject has been discussed on the net before or not, but
>I have discovered this problem recently and hope someone out there can help me.
>We have discovered a folder on one of the MacIIs in our lab that has nothing 
>in it, but it will not let us throw it away.  It kept coming back with a 
>"File busy or folder not empty" message.  ResEdit and MacTools don't do the 
>trick either. Does any of you have any ideas on how we can throw the possessed 
>folder away?  Until then, it's appropriately named "Satan" on the harddisk.  

>Thanks advance for your help,

I had exactly the same problem with my Mac, and couldn't figure out what was
causing it.  Eventually (through exhaustive application of all the tools at
my disposal) I discovered that if I used the DiskInfo DA to report the size
of the offending folder, it was reported as containing "-2 files"!  Somehow,
and I still not sure how, the directory structure had been corrupted in a
way that undoubtedly made the Mac OS think the folder contained an incredibly
large number of files.  Thus, the "File busy or folder not empty" message.

My solution?  Use a backup program to save the hard disk, then reformat and
restore.  Some Mac hacker out there may know a better solution (and perhaps
why the problem occurs), but I don't.

pnm@goanna.oz.au (Paul Big-Ears Menon) (02/07/90)

yang@mist.cs.orst.edu (Sherry Yang) writes:

>We have discovered a folder on one of the MacIIs in our lab that has nothing 
>in it, but it will not let us throw it away.  It kept coming back with a 
>"File busy or folder not empty" message.  ResEdit and MacTools don't do the 
>trick either.

You are not alone.  Some lucky person in our computer centre has an SE with
the same problem.  The folder has been made invisible.  I have noted on a
few occasions "near misses" to this problem.  Opening a folder, trashing its
contents, trashing the folder, then "empty trash" results in the same prob.
Even a second attempt (when there is nothing in the folder) fails.  It seems
to recover later, either due to a reboot or some other magical sequence.  I
too would be interested in the solution to the persistent folder.

Paul Menon
pnm@goanna.cs.rmit.OZ.AU
'So this is Interne...Christmas'

rowen@blake.acs.washington.edu (Russell Owen) (02/07/90)

There are two basic reasons you might get an undeletable folder. The most common
reason is that some program is has that folder as its default directory.
The least common but hardest-to-fix reason is the disk directory is confused
about that file -- apparently the disk directory keeps a count of how many files
are in a folder, and if that number gets off (as can happen in a bad crash
or similar nastiness) forget about deleting the folder.

Here is a list of things I suggest you try, in order easy to hard.
Method 1 or 2 should handle the simple case. Method 8 should handle
the nasty case. Odds aren't very good on the others, but it's worth
playing around a bit before doing method 8 (backup up/initialize/restore).

1) reboot
2) reboot with no INITs
3) rebuild the desktop file (hold down command and option while you boot)
4) ran Apple's Disk1stAid and any other diagnostic software you have
5) look for viruses (I recommend Disinfectant, I think 1.6 is the latest vers.)
6) replace the system software (copy over new System, Finder, etc. files,
   and then run the installer)
7) run ResEdit, select the folder, and use the Clear command (suggested by
   somebody on the net whose name I've lost when I posted with this problem)
8) back up all the data (except the undeletable folder),
   initialize the drive using your hard disk management software,
   while you're at it, run a disk check and bad-block-zeroing utility
     if you have one-- LaCie's SilverLining is good,
   and then restore the data
9) it's hard to imagine (8) failing, but if you get this far, all I can think of
   is to reformat your drive, ignore the problem, or replace the drive.

Hope this helps.

Russell Owen
owen@phast.phys.washington.edu
owen@uwaphast.bitnet

P.S. for the nasty case, some people have recommended trying to edit the disk
directory to fix the offending file-count byte yourself. If you are interested,
somebody may have instructions. But messing with a directory is dangerous --
you REALLY should back up all your files first, and by the time you do that,
might as well play it safe and use method 8, IMHO. Not that I followed my own
advice -- I tried to edit the directory but couldn't find the right byte.

wiseman@tellab5.TELLABS.COM (Jeff Wiseman) (02/07/90)

In article <15543@orstcs.CS.ORST.EDU> yang@mist.CS.ORST.EDU (Sherry Yang) writes:
>I am not sure if this subject has been discussed on the net before or not, but
>I have discovered this problem recently and hope someone out there can help me.
>We have discovered a folder on one of the MacIIs in our lab that has nothing 
>in it, but it will not let us throw it away.  It kept coming back with a 
>"File busy or folder not empty" message.  ResEdit and MacTools don't do the 
>trick either. Does any of you have any ideas on how we can throw the possessed 
>folder away?  Until then, it's appropriately named "Satan" on the harddisk.  

I have seen this several times before. I don't  understand why it happens but I
know a clutsy way to get rid of it.

Try dragging to the trash while holding the command or option key (I forget
which it is that works). then after it is in the trash, hit the restart key on
the programmers switch.

This has worked for me but if anyone knows of side effects useing this
technique, I would like to hear of them.

Hope this is useful.






-- 
Jeff Wiseman:	....uunet!tellab5!wiseman OR wiseman@TELLABS.COM

norman@a.cs.okstate.edu (Norman Graham) (02/08/90)

From article <2840@goanna.oz.au>, by pnm@goanna.oz.au (Paul Big-Ears Menon):
> yang@mist.cs.orst.edu (Sherry Yang) writes:
> 
>>We have discovered a folder on one of the MacIIs in our lab that has nothing 
>>in it, but it will not let us throw it away.  [...]
> 
> You are not alone.  [...]
> It seems
> to recover later, either due to a reboot or some other magical sequence.  

In all the cases like this that I've run across, the problem was due to
some application, DA, cdev, or INIT keeping the directory open--that's
why rebooting solved the problem. Sometimes this can be fairly subtle,
especially if, in ages past, you've configured a cdev to use that
directory; of course now you may not even remember you have that cdev
installed.
-- 
Norman Graham                            Oklahoma State University
  Internet:  norman@a.cs.okstate.edu     Computing and Information Sciences
      UUCP:  {cbosgd, rutgers}           219 Mathematical Sciences Building
              !okstate!norman            Stillwater, OK  USA  74078-0599

nebel@wam.umd.edu (Chris D. Nebel) (02/08/90)

In article <5642@blake.acs.washington.edu> Russell Owen writes:
>Ways to get rid of undeletable folders
   (or undeletable files -- also a possibility!)
>
>1) reboot
>2) reboot with no INITs
>3) rebuild the desktop file (hold down command and option while you boot)
>4) ran Apple's Disk1stAid and any other diagnostic software you have
>5) look for viruses (I recommend Disinfectant, I think 1.6 is the latest vers.)
>6) replace the system software (copy over new System, Finder, etc. files,
>   and then run the installer)
>7) run ResEdit, select the folder, and use the Clear command (suggested by
>   somebody on the net whose name I've lost when I posted with this problem)
>8) back up all the data (except the undeletable folder),
>   initialize the drive using your hard disk management software,
>   while you're at it, run a disk check and bad-block-zeroing utility
>     if you have one-- LaCie's SilverLining is good,
>   and then restore the data
>9) it's hard to imagine (8) failing, but if you get this far, all I can
>   think of is to reformat your drive, ignore the problem, or replace
>   the drive.
>
>Russell Owen
>owen@phast.phys.washington.edu
>owen@uwaphast.bitnet

This list sounds real good, except that I'd move #7 (using ResEdit) up to
just before #5 (checking for viruses).  Also, be warned that the method
described of replacing your System software will trash any fonts or DAs
you have installed in the System file.  However, I believe that this
method is also necessary, since, if you have a corrupted System file, I'm
not sure that the Installer is smart enough to figure that out.


Chris Nebel
nebel@wam.umd.edu

TCO1@psuvm.psu.edu (02/08/90)

You need a program like DeskZap DA that will let you "close an open file".
Once this is done you can delete it with DeskZap or just throw it in the
trash.  Hope this helps.

Tim Oravec                           TCO1@PSUVM.BITNET
Agronomy Dept.                       (814) 865-2242
Penn State U.

mdc@spt.entity.com (Marty Connor) (02/08/90)

In article <15543@orstcs.CS.ORST.EDU> yang@mist.CS.ORST.EDU (Sherry Yang) writes:
>We have discovered a folder on one of the MacIIs in our lab that has nothing 
>in it, but it will not let us throw it away.  It kept coming back with a 
>"File busy or folder not empty" message.  ResEdit and MacTools don't do the 
>trick either. Does any of you have any ideas on how we can throw the 
>possessed folder away?  Until then, it's appropriately named "Satan"
> on the harddisk.  

>Sherry
>yang@mist.CS.ORST.EDU
>Computer Science Department
>Oregon State University

Usualyy what is happening here is that there is an invisible file in
the folder.  Using a program like MacTools, you can view folders and
see all the files in them and set the invisible files visible.

The desk accessory called "DiskTop" will do the same thing.

If you have ever run TOPS you may have this problem.  The way they
used to do publishing of directories was to put invisible files in
directories.  Of course later, when it was time to kill the directory,
the finder who can see the invisible files, burps.

Give me a call if you are stumped.

Marty

-- 
Marty Connor, Marty's Computer Workshop,  "Specializing in Macintosh Training"
126 Inman Street, Cambridge, MA 02139; (617) 491-6935
mdc@entity.com, or ...{harvard|uunet}!mit-eddie!spt!mdc

root@brain.UUCP (Chuck Shotton) (02/08/90)

yang@mist.cs.orst.edu (Sherry Yang) writes:

>I am not sure if this subject has been discussed on the net before or not, but
>I have discovered this problem recently and hope someone out there can help me.
>We have discovered a folder on one of the MacIIs in our lab that has nothing 
>in it, but it will not let us throw it away.  It kept coming back with a 
>"File busy or folder not empty" message.  ResEdit and MacTools don't do the 
>trick either. Does any of you have any ideas on how we can throw the possessed 
>folder away?  Until then, it's appropriately named "Satan" on the harddisk.  

>Thanks advance for your help,

>Sherry
>yang@mist.CS.ORST.EDU

>Computer Science Department
>Oregon State University

I've had this problem before and it's VERY hard to fix. Here's what happens.
The author of Finder incorrectly assumes that a non-zero number of files in a
folder indicates it isn't empty. Unfortunately, negative numbers are non-zero,
and this is the problem. Bugs in programs like Stuffit and the Finder itself
cause the file count to become negative, creating "folders from hell."

I can consistenly create a folder from hell by Stuffing an entire folder under
Multifinder with the option to delete after stuffing activated. It helps to 
have one of the files in the folder be busy (a running app, or open document.)

Anyway, using FEdit you can track down the offending folder's directory entry
and set the negative file count back to zero. This is the HARD part. You have to
know where the file count shows up in the directory entry. I don't know off the
top of my head. Anyway, set it to zero, and you can delete the folder.

(Actually, I shouldn't blame the bug on the Finder author. I'm sure it's one of
the HFS traps that's refusing to clean up the malformed directory. However, some
combination of Multifinder and/or Stuffit is a definite cause.)

Chuck Shotton
cshotton@girch1.hsch.utexas.edu
...!buster!brain!root

kmarko@hpdml93.HP.COM (Kurt Marko) (02/08/90)

I've had one of these ``undeletable'' folders and have done some
poking around to discover the problem.  I had tried all of the 
steps mentioned in a previous posting, short or reinitializing 
my hard disk, and could still not delete the folder.  Here are
some other interesting symptoms.

-- Disk First Aid will not verify the hard disk (although 
everything, including other disk utilities, works fine on 
this disk).

-- When trying to open a ``file'' in this empty folder via
the Standard File Dialog (out of an application), when opening
the folder, one gets ``popped'' back up to the root level
of the disk.  It's as if the file hierarchy is circular, and
that the ``contents'' of this folder is the root.  This 
would explain why the folder is undeletable, since there are
always open files at the root level (e.g. Desktop, System, etc.).

-- From the above observations you would expect that by booting
off of a floppy, under uni-Finder, you could use a tool such
as ResEdit to clear this folder.  I tried, and I couldn't.

This definitely appears to be a ``low-level'' corruption of
the file system.  The folder acquired these demonic properties
after a bomb while testing a program I was working on out of
MPW, so the scenario fits.  If anyone else has some observation
about this type of problem, I'd be interested in hearing about
them.

Kurt Marko
kmarko@hpdml93.hp.com

francis@cheops.cis.ohio-state.edu (RD Francis) (02/09/90)

In article <200@brain.UUCP> root@brain.UUCP (Chuck Shotton) writes:
>yang@mist.cs.orst.edu (Sherry Yang) writes:
>>We have discovered a folder on one of the MacIIs in our lab that has nothing 
>>in it, but it will not let us throw it away.  It kept coming back with a 
>>"File busy or folder not empty" message.
>
>I've had this problem before and it's VERY hard to fix. Here's what happens.
>The author of Finder incorrectly assumes that a non-zero number of files in a
>folder indicates it isn't empty. Unfortunately, negative numbers are non-zero,
>and this is the problem....
>Anyway, using FEdit you can track down the offending folder's directory entry
>and set the negative file count back to zero. This is the HARD part....

Perhaps this is awfully naive of me.  If the problem is that the folder has
a negative number of files in it, isn't it just possible that, by copying
a file into the folder "enough" times, you could make the folder think that
it had 0 files in it?  For users who don't have FEdit, or are nervous about
digging around in their disk directories, IF THIS WORKED, it would be easier
(probably) and less nerve-wracking (definitely).

Alternately, perhaps having a file in it would reset the number of files
counter to the correct value, in which case adding a file, deleting it, and
then trying to delete the folder might cure the problem.

Just a couple of possibilities...



--
R David Francis   francis@cis.ohio-state.edu

johnt@seila.UUCP (john grant) (02/09/90)

	Another trick is to copy some files into the folder (ones that you
don't want anymore - or duplicate files), then trash the lot.  Having done
this, the folder should depart without protest.

	The reason that this sometimes works is because the file count (#
files in the folder) can go negative (feature?), copying files in will bring
it positive and back to something sensible.

	You could also use DiskExpress in its examine volume mode, this will
tidy things up - just hope that you don't see any grim reapers !


				John

CHOOPER@acad.cut.oz (Todd Hooper) (02/09/90)

In article <2840@goanna.oz.au>, pnm@goanna.oz.au (Paul Big-Ears Menon) writes:
> yang@mist.cs.orst.edu (Sherry Yang) writes:
> 
>>We have discovered a folder on one of the MacIIs in our lab that has nothing 
>>in it, but it will not let us throw it away.  It kept coming back with a 
>>"File busy or folder not empty" message.  ResEdit and MacTools don't do the 
>>trick either.
> 
> You are not alone.  Some lucky person in our computer centre has an SE with
> the same problem.  The folder has been made invisible.  I have noted on a
> few occasions "near misses" to this problem.  Opening a folder, trashing its
> contents, trashing the folder, then "empty trash" results in the same prob.
> Even a second attempt (when there is nothing in the folder) fails.  It seems
> to recover later, either due to a reboot or some other magical sequence.  I
> too would be interested in the solution to the persistent folder.

I've had this trouble now and then, and it has always been fixed by rebuilding
the Desktop i.e. exit an application with command + option held down, then
trashing the affected folder or file.

If that doesn't work, I don't know what else you could do. Sprinkle some
holy water around? or more likely sacrifice a virgin to your Mac......;-)

Todd Hooper                                                Computing Centre
                                            Curtin University of Technology
PSImail: psi%050529452300070::CHOOPER                     Western Australia
ACSnet : CHOOPER@acad.cut.oz
Bitnet : CHOOPER%acad.curtin.edu.au%munnari.oz@cunyvm.bitnet
UUCP   : {enea,mcvax,uunet,ubc-cs,ukc}!munnari!acad.curtin.edu.au!CHOOPER
Phone  : +61 9 351 7467 (24 hour messaging system) Fax +61 9 351 2673

leo@duttnph.tudelft.nl (Leo Breebaart) (02/09/90)

In some article RD Francis <francis@cis.ohio-state.edu> writes:
>
>If the problem is that the folder has
>a negative number of files in it, isn't it just possible that, by copying
>a file into the folder "enough" times, you could make the folder think that
>it had 0 files in it?

This indeed works. Unfortunately, I had on my hard disk at home a folder
which the finder thought had 8 files in it, though in fact it was empty.

>Alternately, perhaps having a file in it would reset the number of files
>counter to the correct value, in which case adding a file, deleting it, and
>then trying to delete the folder might cure the problem.

Yeah, I also came up with this smart idea. Tried it, got a bit carried away 
with it ("*Delete This Folder* You stupid IBM Clone %@#$#$!^%#"), and as a 
result now have an empty folder which the finder thinks has 81 files in it.

Oh, and by the way: Folders From Hell are the Ultimate Thrashcan: if you put 
files into them, be assured that they will (eventually) dissapear 
automagically. And for ever.

If only someone (from Apple perhaps?) could post the 100% *exact* location
where I can find the file number in the directory structure...


Leo Breebaart (leo @ duttnph.tudelft.nl)

macak@lakesys.lakesys.com (James Macak) (02/09/90)

In article <15000001@hpdml93.HP.COM> kmarko@hpdml93.HP.COM (Kurt Marko) writes:
>I've had one of these ``undeletable'' folders and have done some
>poking around to discover the problem.  I had tried all of the 
>steps mentioned in a previous posting, short or reinitializing 
>my hard disk, and could still not delete the folder.  Here are
>some other interesting symptoms.
(Several lines deleted.)
>This definitely appears to be a ``low-level'' corruption of
>the file system.  The folder acquired these demonic properties
>after a bomb while testing a program I was working on out of
>MPW, so the scenario fits.  If anyone else has some observation
>about this type of problem, I'd be interested in hearing about
>them.
>
>Kurt Marko
>kmarko@hpdml93.hp.com

After one has gone through all the "fixes" for this problem, and they have not
worked, it's very likely that the difficulty is indeed the "non-zero" (usually
negative) file count that is assigned to the folder.

I am yet to see an easy "fix" for this.  (Hint, anyone want to tackle this
with a quick and dirty application?)

Following are "reprints" of some instructions that I came across on
FidoNet's EchoMac area some time ago.  I followed the instructions and indeed
was able to delete the "Folder from Hell" that my disk had once upon a time.
Beware that you may damage your disk directory if you muck up this "fix," so
best to back-up first!!!  (I take no responsibility for what you do based on
this message... you have been warned!)

Anyway, here's the info... USE AT YOUR OWN RISK.

Jim
macak@lakesys.lakesys.com (James Macak)


-----

From:    Chuck Shotton 
To:      Andy Shaw                                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                                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.lakesys.com (James Macak)     "I'm curious, Doctor, why is it
      << All my own opinions. >>              called 'M-5' and not 'M-1'?"

cousens@elbereth.rutgers.edu (Cousens) (02/09/90)

In article <5642@blake.acs.washington.edu> rowen@blake.acs.washington.edu (Russell Owen) writes:

> [ some stuff about deleting 'Folders from Hell'
> 
> 1) reboot
> 2) reboot with no INITs

I also rebooted off a different disk, and was able to delete the
offending folder.  (a variation of the above)

Scott.

cousens@elbereth.rutgers.edu (Cousens) (02/10/90)

In article <15543@orstcs.CS.ORST.EDU> yang@mist.cs.orst.edu (Sherry Yang) writes:

> We have discovered a folder on one of the MacIIs in our lab that has nothing 
> in it, but it will not let us throw it away. 

A bunch of solutions have been posted. You could also try, after

>1. rebooting, 
>2. rebooting - no inits/cdevs 

Rebooting off a different disk (probably the same as above). It worked
for me.
Scott.

pfluegerm@valley.UUCP (Mike Pflueger) (02/13/90)

Well, it's funny, but I recently got one of those folders from hell too.
Seems to be a fairly common problem.

And it's not something simple like an invisible or locked file;
rebooting, rebuilding the desktop, or anything like that will clear it.
I've seen a lot of simple solutions by people who obviously are taking
a shot in the dark, but no real solutions by anyone who has had and
cleared the problem.  I know the Mac and its routines pretty well, and
the solution to this is not an obvious one.

I'd say it's pretty definite the directory is screwed up...

Yes, I've tried DiskTop, DiskExpress, SUM, 1st Aid HFS, Fedit, ResEdit,
cursing, kicking, and incantations.  Haven't yet tried the virgin
sacrifice idea though - I will if I find one.  :-)  

None of these can find a problem or clear the problem.  I know that
reformatting the disk will solve it (I've had this on floppies before),
but this is not my first choice for a full 100 meg hard disk.

The idea of the number of children in the directory being decremented
beyond 0 sounds plausible, except I would think DiskExpress or SUM would
have found this.  Also, GetInfo reports 0 files in the directory, but
they might say 0 for anything < 1.

I've thought about writing a program to go in and look at this bad
directory, and ultimately fix such problems once I've figured it out,
but is this any way to run a user-friendly computer?

Could we maybe hear from an Apple file expert on this problem?

-- 
Mike Pflueger @ AG Communication Systems (formerly GTE Comm. Sys.), Phoenix, AZ
  UUCP: {...!ames!ncar!noao!asuvax | uunet!hrc | att}!gtephx!pfluegerm
  Work: 602-582-7049        FAX: 602-581-4850
Packet: WD8KPZ @ W1FJI     Internet: PLEASE USE UUCP PATH (NOT INTERNET)!

LGEORGE@insted.unimelb.edu.au (Lord Vader) (02/15/90)

In article <489b3b84.15840@valley.UUCP>, pfluegerm@valley.UUCP (Mike Pflueger) writes:
> Well, it's funny, but I recently got one of those folders from hell too.
> Seems to be a fairly common problem.
> 

> Could we maybe hear from an Apple file expert on this problem?
> 
> -- 
> Mike Pflueger @ AG Communication Systems (formerly GTE Comm. Sys.), Phoenix, AZ
>   UUCP: {...!ames!ncar!noao!asuvax | uunet!hrc | att}!gtephx!pfluegerm
>   Work: 602-582-7049        FAX: 602-581-4850
> Packet: WD8KPZ @ W1FJI     Internet: PLEASE USE UUCP PATH (NOT INTERNET)!

Hi.
I've had this problem too, and I found the miracle cure.  Yes, its true, it can 
be avoided.  The secret?, well, its purty simple.  It involves two things... 
Firstly, the Open File dialog [or the save file dialog] and secondly the trash 
can.  As it turns out, and you can test this out, if you are trying to trash a 
folder that you just opened a file from [or saved a file too] then when you do 
trash it, the finder screams about the folder being locked [which it is, 
technically speaking].  I find that the cure is found via disktop, or through 
the open file dialog.  If you have disktop, the answer is to just call up 
disktop and change the folder that appears from the folder you want to trash to 
any other folder [I choose the top level of the hard disk/floppy].  Having done 
this, it is now safe to trash the folder.  The alternative is to launch another 
program, which will in itself then select the folder that the program is in, 
then quit and trash the folder you wanted to trash.
Sound simple?  I realise that it is a bit long winded, but thats how it is.  
Ever since I found this out I have had no more folders refusing to depart the 
world of the desktop [except when I forget what I'm doing and trash first ask 
questions later :) ].
I hope that this helps.
No I don't know why the finder doesnt check to see if the folder you are about 
to trash is locked by open-file [save-file] and not just unselect before the 
trash.

Happy Macing!
ps:  Has anyone else [besides the original poster of the message] seen or heard 
anything about the new trojans? I haven't as yet, and no one has posted 
anything about a sighting yet either.
pps:  Has anyone found out WHERE WDEF [the virus that is] originated from?  Its 
spreading like wild fire all over the US of A, yet no one is really saying 
much about it, or how it works, or where it came from, or what its purpose is.
Just thought I'd ask.

-- 
George Stamatopoulos					#### ###
La Trobe University -					#### ###
	Lincoln School of Health Sciences		#### #####
Computing Unit						#### ##### incoln
Melbourne						####
Victoria						##########
Australia						########## a Trobe

prg@bonnie.ATT.COM (Paul R. Gloudemans) (02/15/90)

In article <489b3b84.15840@valley.UUCP>, pfluegerm@valley.UUCP (Mike Pflueger) writes:
> 
> Well, it's funny, but I recently got one of those folders from hell too.
> Seems to be a fairly common problem.
> 
> And it's not something simple like an invisible or locked file;
> rebooting, rebuilding the desktop, or anything like that will clear it.


My problem was indeed having a non-zero valence for folders with no
files or folders contained within.

I've had these kind of folders around for some time too ... until
yesterday!  Thanks to some almost correct suggestions that came
accross the net, I DID get rid of them.  The procedure I followed was:

1.)	Make absolutely sure there were no invisible/locked files in the
	folder by using MacSnoop to verify emptiness. (You can use several
	other tools as well like ResEdit.)

2.)	Rename the folder(s) to HellFolderN or something you KNOW is
	unique on your disk where N is 1, 2, etc. for as many
	HellFolders as you have.  By renaming them all you will only
	need search the disk once in the steps below to fix all of
	them.

3.)	Using MacSnoop (or some other suitable disk editor), open the disk
	volume and do an ASCII search for the string HellFolder (without 
	the appended digit).

4.)	If the string HellFolderN is immediately followed by 0100 0000 XXXX
	hex, then change XXXX to 0000, this is the valence word in the
	directory entry (the 01 tells you it is a directory entry).
	NOTE: the 00 following the 01 and the 0000 need not be zeros but
	they always were in my cases, these are reserved and flag bytes.

5.)	Repeat steps 3.) and 4.) for **ALL** occurrences of HellFolder to
	be found on the disk.  This step is necessary since directory
	entries get moved around and you want to make sure you get the
	active one and not just some fragment left somewhere on the
	disk.  The searching will take some time if you have a large
	disk.

6.)	Quit MacSnoop and immediately reboot.  (I think this is
	necessary because the OS may be keeping the directory entry in RAM
	or maybe the disk RAM cache is responsible.  All I know is I
	had to do it to be able to trash the folders.)

7.)	After rebooting the HellFolder(s) should be trashable! (They were
	for me.)

If you feel squeemish about this, back up your disk first and practice
on a floppy looking for the directory entries as described above.

If this works for you, post a note to the net so that others may feel
more confident in using the technique and BY ALL MEANS post corrections
if you think I described something incorrectly.

Good Luck!

englandr@phoenix.Princeton.EDU (Scott Englander) (02/21/90)

In article <1990Feb6.213912.26834@ultra.com> rich@ultra.com (Rich Fall) writes:
>yang@mist.cs.orst.edu (Sherry Yang) writes:
>
>>We have discovered a folder on one of the MacIIs in our lab that has nothing 
>>in it, but it will not let us throw it away.  It kept coming back with a 

>
>My solution?  Use a backup program to save the hard disk, then reformat and
>restore.  Some Mac hacker out there may know a better solution (and perhaps
>why the problem occurs), but I don't.

No need to take such drastic action.  Simply select the folder from
within ResEdit, and then select "Clear" from the Edit menu.  That will
get rid of it.
-- 

                                               - Scott

prg@bonnie.ATT.COM (Paul R. Gloudemans) (02/22/90)

In article <14003@phoenix.Princeton.EDU>, englandr@phoenix.Princeton.EDU (Scott Englander) writes:
> 
> No need to take such drastic action.  Simply select the folder from
> within ResEdit, and then select "Clear" from the Edit menu.  That will
> get rid of it.

Oh!  How come my version of ResEdit comes back with an Alert that says
(paraphrased) 'That operation is not allowed on a non-empty folder'?

The problem is caused by an erroneous valence in the directory entry
for the Folder.  Any application using File Manager calls is not going
to be successful in deleting the folder.

Assuming you have made absolutely sure the folder
really is empty, by using ResEdit, for example, to verify this, then
there are only two ways I know to correct the problem.  One is
complete backup and re-initialize the disk, i.e., create a new
directory structure and the other is to edit the disk volume with a
program like MacSnoop, FEdit+, or Symantic Tools according to
directions I previously posted which worked for me and at least one
other person who dropped me an email thanks.

Since this topic has been burning so much bandwidth on the net, I
really wish Apple would respond with a "sanctioned" method for getting
rid of these beasties (or have I just missed it because of the volume
of posts on this subject).

russotto@eng.umd.edu (Matthew T. Russotto) (02/23/90)

In article <4259@cbnewsl.ATT.COM> prg@bonnie.ATT.COM writes:
>
>Since this topic has been burning so much bandwidth on the net, I
>really wish Apple would respond with a "sanctioned" method for getting
>rid of these beasties (or have I just missed it because of the volume
>of posts on this subject).

Yeah-- for instance, make Disk First Aid work with it.  Disk First Aid
just claims 'Cannot verify status of disk' when presented with these
problems.
--
Matthew T. Russotto	russotto@eng.umd.edu	russotto@wam.umd.edu
][, ][+, ///, ///+, //e, //c, IIGS, //c+ --- Any questions?

MSR104@psuvm.psu.edu (Mike Rineer) (02/23/90)

In article <14003@phoenix.Princeton.EDU>, englandr@phoenix.Princeton.EDU (Scott
Englander) says:
>
>In article <1990Feb6.213912.26834@ultra.com> rich@ultra.com (Rich Fall)
>writes:
>>yang@mist.cs.orst.edu (Sherry Yang) writes:
>>
>>>We have discovered a folder on one of the MacIIs in our lab that has nothing
>>>in it, but it will not let us throw it away.  It kept coming back with a
>
>>
>>My solution?  Use a backup program to save the hard disk, then reformat and
>>restore.  Some Mac hacker out there may know a better solution (and perhaps
>>why the problem occurs), but I don't.
>
>No need to take such drastic action.  Simply select the folder from
>within ResEdit, and then select "Clear" from the Edit menu.  That will
>get rid of it.
>--

Don't even have to do that.  Just reboot and then Trash it normally.

--Mike

jrk@sys.uea.ac.uk (Richard Kennaway) (02/23/90)

I've got one of these too, and none of the simple tricks (ResEdit, drag
to trash and hit reboot switch, etc.) get rid of it.  What I havent seen
in this interminable thread is why I should bother taking any more
drastic action, like reformatting.  Do these things do any harm?

--
Richard Kennaway          SYS, University of East Anglia, Norwich, U.K.
Internet:  jrk@sys.uea.ac.uk		uucp:  ...mcvax!ukc!uea-sys!jrk

wiseman@tellab5.tellabs.com (Jeff Wiseman) (02/24/90)

In article <4259@cbnewsl.ATT.COM> prg@bonnie.ATT.COM writes:
>In article <14003@phoenix.Princeton.EDU>, englandr@phoenix.Princeton.EDU (Scott Englander) writes:
>> 
>> No need to take such drastic action.  Simply select the folder from
>> within ResEdit, and then select "Clear" from the Edit menu.  That will
>> get rid of it.
>
>Oh!  How come my version of ResEdit comes back with an Alert that says
>(paraphrased) 'That operation is not allowed on a non-empty folder'?

I posted a suggestion a ways back that may not have gotten out of our mail
machine.

In the past, I have drug (dragged?) the ofending folder into the trash using
the option key (or command, I can't remember which). Then once its in the
trash, I hit the programmer's reset button.

It always seemed to get rid of the folder but it seems insecure. If anyone
knows of dangers that might exist doing this I need to know. Otherwise, this is
how I get rid of these strange beasties.


-- 
Jeff Wiseman:	....uunet!tellab5!wiseman OR wiseman@TELLABS.COM

jdevoto@Apple.COM (Jeanne A. E. DeVoto) (02/25/90)

In article <1316@sys.uea.ac.uk> jrk@sys.uea.ac.uk (Richard Kennaway) writes:
>I've got one of these too, and none of the simple tricks (ResEdit, drag
>to trash and hit reboot switch, etc.) get rid of it.  What I havent seen
>in this interminable thread is why I should bother taking any more
>drastic action, like reformatting.  Do these things do any harm?

A Folder from Hell (the type that won't go away after rebooting) won't do
any harm in itself. However, it is symptomatic of damage to the volume's
directory structure. If the directory is damaged and Disk First Aid won't
repair it, it's a good idea to back up and reinitialize to avoid future
directory problems.
-- 
====== jeanne a. e. devoto ========================================
 jdevoto@apple.com  |  You may not distribute this article under a
 jdevoto@well.UUCP  |  compilation copyright without my permission.
___________________________________________________________________
 Apple Computer and I are not authorized  |        CI$: 72411,165
 to speak for each other.                 |  AppleLink: SQA.TEST

zelenski@jessica.Stanford.EDU (julie zelenski) (03/01/90)

In article <14003@phoenix.Princeton.EDU> englandr@phoenix.Princeton.EDU (Scott
 Englander) writes:
>In article <1990Feb6.213912.26834@ultra.com> rich@ultra.com (Rich Fall) writes
>>yang@mist.cs.orst.edu (Sherry Yang) writes:
>>
>>>We have discovered a folder on one of the MacIIs in our lab that has nothing
>>>in it, but it will not let us throw it away.  It kept coming back with a 
>>
>>My solution?  Use a backup program to save the hard disk, then reformat and
>>restore.  Some Mac hacker out there may know a better solution (and perhaps
>>why the problem occurs), but I don't.

Yes, this is a case of your directory sturcture being corrupted. The Folders
that Won't Die have a non-zero file count even though there aren't any files
in them. There is a way to fix this without entirely re-formatting.  You will
need 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 many times.  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.

It takes courage, but it is really not difficult.

julie zelenski
stanford university