Unable to delete a directory

M

mojo.chan

I cannot delete a directory on one of my hard drives. The directory has
the name "871", but I can rename it. However, when I try to delete it
from Explorer, I get "The directory name is invalid. (267)".

I cannot delete it from a command prompt or using and third party tool.
I cannot set permissions either - trying to do so causes the explorer
window to hang. I cannot change owner either (currently
BUILTIN\Administrators). ChkDsk reports my drive is OK. Hardware tests
show my system is OK. The directory has a strange icon - a normal
looking folder with a tiny clock next to it:

http://img93.imageshack.us/img93/3417/folderim5.png

There are no strange characters in the path or anything like that. 8.3
file name is also "871". File system is NTFS. All Windows updates, up
to date drivers.

I would put the drive in another machine and try deleting the folder,
but it is part of a RAID array so it is not possible at the moment.

Anyone got any ideas? Short of a re-format, I can't see any solution.
 
G

Galen

In (e-mail address removed) had this to say:

My reply is at the bottom of your sent message:
I cannot delete a directory on one of my hard drives. The directory
has the name "871", but I can rename it. However, when I try to
delete it from Explorer, I get "The directory name is invalid. (267)".

I cannot delete it from a command prompt or using and third party
tool. I cannot set permissions either - trying to do so causes the
explorer window to hang. I cannot change owner either (currently
BUILTIN\Administrators). ChkDsk reports my drive is OK. Hardware tests
show my system is OK. The directory has a strange icon - a normal
looking folder with a tiny clock next to it:

http://img93.imageshack.us/img93/3417/folderim5.png

There are no strange characters in the path or anything like that. 8.3
file name is also "871". File system is NTFS. All Windows updates, up
to date drivers.

I would put the drive in another machine and try deleting the folder,
but it is part of a RAID array so it is not possible at the moment.

Anyone got any ideas? Short of a re-format, I can't see any solution.

Let's see if you can get it to go away via moving it on boot and then
deleting it or just plain deleting it on boot. Take a gander here:

MoveOnBoot:
http://www.softwarepatch.com/software/moveonboot.html

--
Galen - MS MVP - Windows (Shell/User & IE)
http://dts-l.org/ http://kgiii.info/

"Chance has put in our way a most singular and whimsical problem, and
its solution is its own reward." - Sherlock Holmes
 
G

Guest

I cannot delete a directory on one of my hard drives. The directory has
the name "871", but I can rename it. However, when I try to delete it
from Explorer, I get "The directory name is invalid. (267)".

I cannot delete it from a command prompt or using and third party tool.
I cannot set permissions either - trying to do so causes the explorer
window to hang. I cannot change owner either (currently
BUILTIN\Administrators). ChkDsk reports my drive is OK. Hardware tests
show my system is OK. The directory has a strange icon - a normal
looking folder with a tiny clock next to it:

http://img93.imageshack.us/img93/3417/folderim5.png

There are no strange characters in the path or anything like that. 8.3
file name is also "871". File system is NTFS. All Windows updates, up
to date drivers.

I would put the drive in another machine and try deleting the folder,
but it is part of a RAID array so it is not possible at the moment.

Anyone got any ideas? Short of a re-format, I can't see any solution.

Yes you can't becuase it's Attrib is *Read Only* Uncheck this Box then
Reboot and try to delete.
Another is to take the ownership of this directory:
http://support.microsoft.com/kb/308421

If still no joy, try to download this Utility and Delete the Directory:
http://www.purgeie.com/delinv/index.htm
If still please write back with more info about what you did crossed for us
to know what we are dealing with.
HTH.
Please report back your result.
Regs,
nass
 
M

MoJo

Thanks for the responses. Lets see if we can get to the bottom of this.

I already tried various "move on restart" utilties, including KillBox,
but to no avail.

When I try to remove the "Read-Only" attribute, I get a message from
Explorer saying

An error occoured applying attributes to the file
e:\mojo\...\871
Acess is denied.

I get a similar message when using the command prompt. I also tried the
utility nass linked to, but it didn't work.

Because I have a crappy OEM copy of Windows, I can't call Microsoft and
my OEM has no clue. I'm a computer technician anyway, and it seems I
know more than they do.

I should also mention that I can't access the directory or store files
in it. I get the "name is invalid" message when I try to do so.

Regards,
Paul
 
G

Guest

MoJo said:
Thanks for the responses. Lets see if we can get to the bottom of this.

I already tried various "move on restart" utilties, including KillBox,
but to no avail.

When I try to remove the "Read-Only" attribute, I get a message from
Explorer saying

An error occoured applying attributes to the file
e:\mojo\...\871
Acess is denied.

I get a similar message when using the command prompt. I also tried the
utility nass linked to, but it didn't work.

Because I have a crappy OEM copy of Windows, I can't call Microsoft and
my OEM has no clue. I'm a computer technician anyway, and it seems I
know more than they do.

I should also mention that I can't access the directory or store files
in it. I get the "name is invalid" message when I try to do so.

Regards,
Paul

Hi Paul,
I think your Directory is encrypted for that reason you can't change the
Attrib.
Read this it may help you unlock the puzzle:
http://support.microsoft.com/kb/308993

Another to try is the Deltree command in Dos Command:
Deletes a directory and all the subdirectories and files in it.

To delete one or more files and directories: DELTREE [/Y] [drive:]path
[[drive:]path[...]]

/Y Suppresses prompting to confirm you want to delete the subdirectory.
[drive:]path Specifies the name of the directory you want to delete.

Note: Use DELTREE cautiously. Every file and subdirectory within the
specified directory will be deleted. Once deleted, you cannot recover the
information.

EXAMPLE

deltree E:\mojo\...\871 = Deletes the mojo directory and everything in it.

HTH.
Regards,
nass
 
A

AJR

The "read only" attribute is "standatrd" for files - does not cause any
problems. Note the following from a quick Google:

"According to Microsoft, this error indicates that a directory name is
invalid. (See System Error Codes in related links section for more
information). One common cause of this error is the My Documents folder does
not have its default target and may be targeted towards a network folder
that no longer exists. To change this, right click on the My Documents
folder and select Properties. Under the Target tab, select Restore Default.
If you are confident that all directoies are valid, install the latest
version of the MSI Installer (linked below).

Related Links:
Microsoft Developer Network: System Error Codes (0-499)
Microsoft.com: Windows Installer 3.1 for Windows XP"
 
G

Galen

In MoJo had this to say:
An error occoured applying attributes to the file
e:\mojo\...\871
Acess is denied.

See if taking ownership helps?

How to take ownership of a file or folder in Windows XP:
http://support.microsoft.com/kb/308421

It'd be a shame to reinstall over something like this... Additionally, one
of the live CDs that are Linux based /might/ get you around it.

--
Galen - MS MVP - Windows (Shell/User & IE)
http://dts-l.org/ http://kgiii.info/

"Chance has put in our way a most singular and whimsical problem, and
its solution is its own reward." - Sherlock Holmes
 
M

MoJo

Thanks everybody for the suggestions.

Deltree does not work, access denied error again.

I cannot take ownership of the directory, it freezes explorer when I
try to do so. Similarly, I cannot change the encryption status on the
file, although the properties box says that it is not encrypted.

There are only two user accounts, the MoJo account and Administrator.
Well, Guest is enabled too. I have tried deleting the file or taking
ownership from all of these accounts, with the same result.

It looks like a filesystem problem, but ChkDsk and PartitionMagic
checks don't detect any problems...

Paul
 
G

Galen

In MoJo had this to say:

My reply is at the bottom of your sent message:
Thanks everybody for the suggestions.

Deltree does not work, access denied error again.

I cannot take ownership of the directory, it freezes explorer when I
try to do so. Similarly, I cannot change the encryption status on the
file, although the properties box says that it is not encrypted.

There are only two user accounts, the MoJo account and Administrator.
Well, Guest is enabled too. I have tried deleting the file or taking
ownership from all of these accounts, with the same result.

It looks like a filesystem problem, but ChkDsk and PartitionMagic
checks don't detect any problems...

Paul

Paul,

Yeah it's gonna be a tough one from the looks of things...

(If worse comes to worse, well, can you live with the file being there? I'd
absolutely HATE to recommend that though. I'm pretty anal about mysteries.)

Starting here...

You cannot delete a file or a folder on an NTFS file system volume:
http://support.microsoft.com/kb/320081

My own ranting gibberish:

Chkdsk, the reality:
http://kgiii.info/windows/XP/general/chkdsk.html

Use both the /r and /f switch. (Yeah I'll take some more flack.)

And THEN let's see if it can be deleted.

Hmm... Dumb question time... Have you tried removing it in safe mode?

Safe Mode:
http://kgiii.info/windows/all/general/safemode.html

I hate to recommended it but you can also download a bootable version of
Linux (I like Ubuntu) and probably delete it without a problem. *chuckles* I
use ERD from Systernals but it's very expensive so probably not something
you'd want to invest in unless you were a decent sized shop.

--
Galen - MS MVP - Windows (Shell/User & IE)
http://dts-l.org/ http://kgiii.info/

"Chance has put in our way a most singular and whimsical problem, and
its solution is its own reward." - Sherlock Holmes
 
G

Guest

I hesitate to speak up in the company of these MVPs, but I wonder if you
could use the recovery console to delete the folder? I don't believe you
mentioned whether you can move it or not, but you said you can rename it. If
you can move it into a directory which is accessible from the recovery
console, maybe that would work.

Regards,
Buck
 
G

Galen

In Buck had this to say:

My reply is at the bottom of your sent message:
I hesitate to speak up in the company of these MVPs, but I wonder if
you could use the recovery console to delete the folder? I don't
believe you mentioned whether you can move it or not, but you said
you can rename it. If you can move it into a directory which is
accessible from the recovery console, maybe that would work.

Regards,
Buck

Oh don't hesitate. We're end users just like you though most of us work in
IT.

The reason I haven't suggested RC is because permissions and improper stored
data will still be in effect in that situation. There's no harm in trying it
however - it just might do the trick.

--
Galen - MS MVP - Windows (Shell/User & IE)
http://dts-l.org/ http://kgiii.info/

"Chance has put in our way a most singular and whimsical problem, and
its solution is its own reward." - Sherlock Holmes
 
M

MoJo

Hi guys.

Thanks for the further hints. I have submitted this to MS for support
to see if they can figure it out.

In the mean time, I tried your suggestions. First, I ran chkdsk with
the flags Galen suggested. No errors were detected, and I still
couldn't delete the file. I have tried safe mode, but I hadn't tried
the recovery console. In the end, that couldn't kill it either.

I have yet to try Linux. I forgot that Linux recently got NTFS write
support. I use Knoppix a fair bit at work for data backup, because it
seems to cope well with corrupted file systems and damaged disks, plus
it ignores all permissions on files. I'm a bit wary of trying it
though, because if there is an issue with the filesystem I'm worried
that the Linux NTFS driver might make it worse.

In particular, I'd just like to know what I'm dealing with here... I
have never seen the little black clock icon before. Still, if I have to
I'll live with it, rather than formatting.

Thanks everyone.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top