[comp.sys.ibm.pc] Need help removing directory !

jmoore@pc.ecn.purdue.edu (James D Moore) (08/16/88)

I have recently run into a problem I cannot figure out. Off of my
root directory I have a directory called "lisp". In trying to make
space the other day I decided to remove all of the files and the
directory. First I removed all of the files in the directory and 
then I tried "rmdir lisp" when in the root. When I did this it gave
me a message telling me that the file could not be found or that 
the directory was not empty or that path was incorrect. I tried
several combinations to remove the file and none worked. I tried
using "XTREE" and it gave me a message that "the disk had been
modified".  I would like to remove this file but cannot figure out
how. Any help would be appreciated. I have access to Norton Utilities
if needs be. 

If someone could mail me the info on how to get the directory out
I would be very grateful. 

Thanks.

Jim Moore
jmooew@cimlab.ecn.purdue.edu

nts0302@dsacg3.UUCP (Bob Fisher) (08/16/88)

Do you have any hidden files that might be keeping rmdir from working ?

-- 
Bob Fisher (osu-cis!dsacg1!bfisher) 614-238-9071 (Autovon 850-9071)
From the Internet: bfisher%dsacg1.uucp@daitc.arpa
US Defense Logistics Agency Systems Automation Center
DSAC-TSX, Box 1605, Columbus, OH 43216-5002

mlawless@ncrwic.Wichita.NCR.COM (Mike Lawless) (08/16/88)

In article <1027@pc.ecn.purdue.edu> jmoore@pc.ecn.purdue.edu (James D Moore) writes:
>
>then I tried "rmdir lisp" when in the root. When I did this it gave
>me a message telling me that the file could not be found or that 
>the directory was not empty or that path was incorrect. 

You probably have a "hidden" file remaining in the directory, due to a copy
protection scheme.  DEL *.* will not delete such a file.  Using Norton, look
for any files with the "Hid" attribute set, and clear it.  These files can
then be deleted, and you will be able to delete the directory.

brown@nicmad.UUCP (Mr. Video) (08/16/88)

In article <1027@pc.ecn.purdue.edu> jmoore@pc.ecn.purdue.edu (James D Moore) writes:
<
<I have recently run into a problem I cannot figure out. Off of my
<root directory I have a directory called "lisp". In trying to make
<space the other day I decided to remove all of the files and the
<directory. First I removed all of the files in the directory and 
<then I tried "rmdir lisp" when in the root. When I did this it gave
<me a message telling me that the file could not be found or that 
<the directory was not empty or that path was incorrect. I tried
<several combinations to remove the file and none worked. I tried
<using "XTREE" and it gave me a message that "the disk had been
<modified".  I would like to remove this file but cannot figure out
<how. Any help would be appreciated. I have access to Norton Utilities
<if needs be. 

Sounds like you have a hidden/read-only/system file in that directory,
that you can't see with a DIR.  Use Norton's FA command to look for these
files, change them so those bits aren't on and then delete them.  Then you
will be able to delete the directory.
-- 
	       harvard-\		 att--\
Mr. Video         ucbvax!uwvax.................!nicmad!brown
	       rutgers-/    rolls-/   decvax--/

johnson@c10sd1.StPaul.NCR.COM (Wayne D. T. Johnson) (08/17/88)

In article <1027@pc.ecn.purdue.edu> jmoore@pc.ecn.purdue.edu (James D Moore) writes:
>First I removed all of the files in the directory and 
>then I tried "rmdir lisp" when in the root. When I did this it gave
>me a message telling me that the file could not be found or that 
>the directory was not empty or that path was incorrect. 
>jmooew@cimlab.ecn.purdue.edu

When I have had this problem before it was due to the fact that there was a
hidden file on the directory.  Hidden files will not be deleted by the normal
del command.  I suggest you get a hold of a file manager that can handle hidden
files, or a copy of one of the chmod utilities and use this to peer into your
lisp directory and then delete whats there.

-- 
Wayne Johnson                 (Voice) 612-638-7665
NCR Comten, Inc.             (E-MAIL) W.Johnson@StPaul.NCR.COM or
Roseville MN 55113                    johnson@c10sd1.StPaul.NCR.COM
These opinions (or spelling) do not necessarily reflect those of NCR Comten.

jmoore@pc.ecn.purdue.edu (James D Moore) (08/17/88)

In my note yesterday I forgot to mention that there are no hidden
files im my directory. I have already used the "chkdsk /f" to find
some unlinked chains. I have checked the attributeson the \lisp
directory and all appears to be OK. DO I have a munget FAT ? This
is the first time I have ever had this kind of a problem.

Jim Moore
jmoore@cimlab.ecn.purdue.edu

platt@emory.uucp (Dan Platt) (08/17/88)

In article <980@dsacg3.UUCP> nts0302@dsacg3.UUCP (Bob Fisher) writes:
>Do you have any hidden files that might be keeping rmdir from working ?
>
>-- 
>Bob Fisher (osu-cis!dsacg1!bfisher) 614-238-9071 (Autovon 850-9071)


I've encountered problems in removing directories under certain
circumstances.  What would happen would be that when I ran 
rmdir <directory> I'd get a complaint that the directory wasn't valid,
or that the directory wasn't empty.  A list of the contents of the
directory revealed no files. 

I was able to delete the directory by doing a backup and restore of the
disk.  What I'd find in the directory would be a set of files called
DELETED.xxx where xxx was a number.   When I erased these files the
directory could be removed.  This problem only occured when the disk was
almost full.  I still don't know what mechanism caused the corruption.
Perhaps it was due in part to a great deal of fragmentation of the disk.
The painful exercize of backup/restore also produced the pleasant effect
of a great deal of access speed up.

I understand that there are disk-fixup utilities available which will
do the task for you without the backup/restore pain (they are called
disk optimizers).  I haven't purchased one; I got a bigger disk instead
(the old one was too small).  You might consider getting one.

I hope this is a help.

Dan Platt

brown@nicmad.UUCP (Mr. Video) (08/17/88)

In article <1030@pc.ecn.purdue.edu> jmoore@pc.ecn.purdue.edu.UUCP (James D Moore) writes:
<
<In my note yesterday I forgot to mention that there are no hidden
<files im my directory. I have already used the "chkdsk /f" to find
<some unlinked chains. I have checked the attributeson the \lisp
<directory and all appears to be OK. DO I have a munget FAT ? This
<is the first time I have ever had this kind of a problem.

I also forgot to mention to ask if you had any directories in the
directory you are trying to get rid of.  If the answer to this is no,
then I suggest that you get out good old Norton's and look at the
directory directly and see if there is anything funny there.  If so,
fix it and then delete it.  Remember, the directory must be completely
empty, except for the . and .. type entries.
-- 
	       harvard-\		 att--\
Mr. Video         ucbvax!uwvax.................!nicmad!brown
	       rutgers-/    rolls-/   decvax--/

danley@osiris.cso.uiuc.edu (08/17/88)

> then I tried "rmdir lisp" when in the root. When I did this it gave
> me a message telling me that the file could not be found or that 
> the directory was not empty or that path was incorrect. .....

The error message was correct although not obvious.  The directory is
not empty.  You most likely have hidden files in /lisp.  DIR will not
show you hidden files.  I use a PD version of "ls" for DOS and the -a
option to list "all" files, including hidden files.  Once you know the
name of your hidden files and remove them, you will be able to rmdir.


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
	James Danley II
	U of IL and US Army Corps of Engineers CERL
UUCP:	{ihnp4,seismo,pur-ee,uunet}!uiucuxc!osiris!danley
ARPA:	danley@osiris.cso.uiuc.edu USMail: Box 2640, Sta. A, Champaign, IL 61820
CSNET:	danley%osiris@uiuc.csnet		Phone:	(217) 344-7772
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

mvolo@ecsvax.uncecs.edu (Michael R. Volow) (08/17/88)

When I had this problem, it was not a hidden file but a disturbed
root directory (or FAT).   I understand that adding a wild card
to the baddirectoryname (e.g. RMDIR lisp* or  RMDIR lisp*) some-
times helps, but it didn't in my case.

Using the disk editor in PCTOOLS, I searched for the bad directory
name string, which I think put me in the root directory.  I then
edited the hex numbers corresponding to the bad directory name,
to make them the same as blank directory entries.  PCTOOLS will
cautioned me that I was in the system area of the disk, but I 
forged ahead, and it worked.  I did a CHKDSK afterwards.  The same
thing can be done with DEBUG, but I am less comfortable with that
program.  You might practice the operation on a floppy with sub-
directories before trying it on you hard disk.

Michael R. Volow                   919 286 0411, page beeper #550
Dept. of Psychiatry                mvolo@ecsvax.UUCP
Durham Vet Admin Medical Center
Durham, N.C. 27705

feg@clyde.ATT.COM (Forrest Gehrke) (08/17/88)

In article <1405@ncrwic.Wichita.NCR.COM>, mlawless@ncrwic.Wichita.NCR.COM (Mike Lawless) writes:
> In article <1027@pc.ecn.purdue.edu> jmoore@pc.ecn.purdue.edu (James D Moore) writes:
> >
> >then I tried "rmdir lisp" when in the root. When I did this it gave
> >me a message telling me that the file could not be found or that 
> 
> You probably have a "hidden" file remaining in the directory, due to a copy
> protection scheme.  DEL *.* will not delete such a file.  Using Norton, look

There have been a number of identical suggestions for correcting 
the problem--but mostly requiring access to Norton's Utilities.
Some versions of msdos have included a CHMOD utility (and there
are also PD versions around) which is specifically intended 
for the purpose of changing a file's attributes so that the file
might be deleted.  Most versions will give usage simply by typing 
chmod without parameters.

  Forrest Gehrke

swh@hpsmtc1.HP.COM (Steve Harrold) (08/17/88)

Re: Removing a directory

If you are absolutely certain that there are no files (hidden or otherwise)
remaining in the directory, I would begin to suspect how the NAME of the 
DIRECTORY itself is formed.

It is possible, in an assembler program, to create filenames and directories 
that contain embedded illegal characters.  Once I had a case where the DIR
command displayed a file named "ABC" but I couldn't do anything with it; I
always got "file not found" even though the DIR was showing it to me.

The kicker was that the complete filename was "ABC XYZ".  Notice the
embedded blank!!!  Apparently the DIR command, when it formats a filename
for display, stops at the first blank character (which is quite reasonable,
since the internal directory entry pads short names with blanks).  If I then
tried to ERASE ABC XYZ, it would still treat "ABC" as the complete filename
and ignore the "XYZ" part.  I couldn't win.

The solution was rather trivial (after some thought).  I simply entered
ERASE ABC* and it finally went away.  Before I did this, I made sure there were
no other files starting with "ABC" that wanted to retain.

If the name of the directory has this problem, you'll have to rename it,
perhaps via an assembler program.  On the other hand, perhaps you STILL have
some files alive within it, files whose names begin with a blank.  Use
Norton to display the directory contents to see if this is the case.

Perhaps you still don't have enough information to solve your problem, 
but maybe this reply will put you on the right track.

--
---------------------
Steve Harrold			...hplabs!hpsmtc1!swh
				HPG200/13
				(408) 447-5580
---------------------

marco@hpmcaa.HP.COM (Marco Dalla-Gasperina) (08/18/88)

Is it possible that you have issued a *subst*
command to map the directory into a logical drive like
subst h: \lisp ?

If a directory is mapped in such a fashion it is marked *in use* 
and can't be gotten rid of unless you un-substitute the drive with
subst h: /D.

A long shot, but....

marco

prime@druhi.ATT.COM (Anthony Davis) (08/18/88)

In article <1027@pc.ecn.purdue.edu>, jmoore@pc.ecn.purdue.edu (James D Moore) writes:
> I have recently run into a problem I cannot figure out. Off of my
> root directory I have a directory called "lisp". In trying to make
> space the other day I decided to remove all of the files and the
> directory. First I removed all of the files in the directory and 
> then I tried "rmdir lisp" when in the root. When I did this it gave
> me a message telling me that the file could not be found or that 
> the directory was not empty or that path was incorrect. I tried
> .......
> If someone could mail me the info on how to get the directory out
> I would be very grateful. 

Try using a utility package(e.g., PCTOOLS or Norton Utils) to determine if
there are any HIDDEN files in the directory. If so, un-hide them and delete
them. Then remove your directory called "lisp".

Good Luck!!!  8-)

Tony Davis
AT&T Bell Labs
Denver, Co.
druhi!prime

leonard@bucket.UUCP (Leonard Erickson) (08/19/88)

In article <1027@pc.ecn.purdue.edu> jmoore@pc.ecn.purdue.edu (James D Moore) writes:
<
<I have recently run into a problem I cannot figure out. Off of my
<root directory I have a directory called "lisp". In trying to make
<space the other day I decided to remove all of the files and the
<directory. First I removed all of the files in the directory and 
<then I tried "rmdir lisp" when in the root. When I did this it gave
<me a message telling me that the file could not be found or that 
<the directory was not empty or that path was incorrect. I tried
<several combinations to remove the file and none worked. I tried
<using "XTREE" and it gave me a message that "the disk had been
<modified".  I would like to remove this file but cannot figure out
<how. Any help would be appreciated. I have access to Norton Utilities
<if needs be. 

If that dir is really named "lisp" and not "LISP" then you'll need
to use Norton to go in and change the name! DOS automaticatically
converts things like fiile and directory names to uppercase. So 
you type "rmdir lisp" and DOS tries to execute "rmdir LISP"...

-- 
Leonard Erickson		...!tektronix!reed!percival!bucket!leonard
CIS: [70465,203]
"I used to be a hacker. Now I'm a 'microcomputer specialist'.
You know... I'd rather be a hacker."

eric@dad.UUCP (Eric Schilling) (08/19/88)

in article <11470036@hpsmtc1.HP.COM>, swh@hpsmtc1.HP.COM (Steve Harrold) says:
> 
> Re: Removing a directory
> 
> some files alive within it, files whose names begin with a blank.  Use
> Norton to display the directory contents to see if this is the case.
> 
Personally, I would suggest using the Norton Utilities for the renaming of 
an "offending" files/directories.  You can use the NU program to edit
the directory entry for each file in question.  Quite handy.

Eric Schilling

dad!eric  (for now)
m-net!gandalf (after 1 September)

brown@nicmad.UUCP (Mr. Video) (08/21/88)

In article <3515@dad.UUCP> eric@dad.UUCP (Eric Schilling) writes:
<in article <11470036@hpsmtc1.HP.COM>, swh@hpsmtc1.HP.COM (Steve Harrold) says:
<> 
<> Re: Removing a directory
<> 
<> some files alive within it, files whose names begin with a blank.  Use
<> Norton to display the directory contents to see if this is the case.
<> 
<Personally, I would suggest using the Norton Utilities for the renaming of 
<an "offending" files/directories.  You can use the NU program to edit
<the directory entry for each file in question.  Quite handy.

Why not do what I do in this case, use the DOS/UNIX wildcard character: ?
Put this in the appropriate spots and you can do whatever you want with the
file name, including RENAMEing it.
-- 
	       harvard-\		 att--\
Mr. Video         ucbvax!uwvax.................!nicmad!brown
	       rutgers-/    rolls-/   decvax--/

omahony@cs.tcd.ie (Donal O'Mahony - OMAHONY@cs.tcd.ie) (08/23/88)

I suggest that you do the following:

First fix any damage:

chkdsk/f

Then find out what is in the directory using:

chkdsk/v | find "LISP"

If it turns out to be a hidden file, you will need Norton (or similar) to
remove it.
_______________________________________________________________________
Donal O'Mahony        omahony@cs.tcd.ie
Computer Science Dept., Trinity College, Dublin 2, Ireland
_______________________________________________________________________

derek@achel.UUCP (derek) (08/24/88)

I recently had a similar problem, which might be of interest. Somehow,
a 'formatted' sector full of 0xF6's got attached to a subdirectory. On
a normal DIR this didn't show up, and I has unable to delete the
subdirectory. On examining the offending subdirectory with some tool -
I think it was vtree or one of the Norton utilities, it showed lots of
division symbols as _subdirectories_. I was surprised they looked like
subdirectories, but I guess the subdirectory bit was set. (that's 0x10
isn't it?).

I solved the problem using pctools directory maintenance, which
allowed me to remove all spurious subdirectories and eventually remove
the offending subdirectory.

I hope this is useful.

Derek Carr.

campbell@hpbsla.HP.COM (gary campbell) (09/14/88)

When this happened to me it was because there was a hidden file (or system,
I don't remember which), the left-overs of a pipe from an aborted program
or something.  If you have Norton utilities, it should be easy to change
the attributes I would think.  On that particular Sunday night, I had
to do it by writing a program in debug!

--
Gary Campbell