PC Review


Reply
Thread Tools Rate Thread

Corrupt Directory?

 
 
Brian Kelly
Guest
Posts: n/a
 
      7th May 2004
I have a directory entry that appears to have somehow become corrupted and
cannot be deleted or other wise affected.

It was created by CheckDsk at some point. The only thing I can do to it is
rename it (which I have, to "foo"). Anything else causes an error.

--Trying to delete in Windows Explorer returns: "Cannot delete foo: The
directory name is invalid."
--Trying to delete from a command prompt returns: "The directory name is
invalid."
--Trying to access the directory in Windows Explorer returns: "D:\foo is
not accessible. The directory name is invalid."
--Trying to change to the directory via command prompt (CD) returns: "The
directory name is invalid."

I have run another check disk, to no avail.

Any thoughts?

Thanks,
Brian


 
Reply With Quote
 
 
 
 
R. C. White
Guest
Posts: n/a
 
      7th May 2004
Hi, Brian.

When ChkDsk finds a "lost chain" that looks like a directory, it gives the
lost chain the name FOUND.001; later such lost chains are named FOUND.002,
etc. If you recognize the filenames in FOUND.001, you may be able to rename
the directory and then Move it back into the parent directory where it
belongs. In most cases, though, the information is incomplete or wrong - in
other words, useless. It may be salvageable, but at such a high cost of
time and effort that it should be considered a total loss. Since ChkDsk has
already give it its best shot, further iterations of ChkDsk are not likely
to do any good.

From the Command prompt, type: dir foo*.* /x. The /x switch should produce
an extra column in the directory listing, showing the Short File Name (SFN),
also known as the 8.3 filename, before the LFN. Even short filenames are
considered LFNs if they contain any characters (including spaces) that are
not allowed in a valid MS-DOS filename. Then Remove the SFN.

Remember that Del deletes FILES; rd (or rmdir) removes DIRECTORIES. So the
proper command is: rd foo

If that doesn't work, then isolate this directory in a parent directory that
contains nothing else. Either Move foo or, if you can't to that, then move
everything except foo from that directory to a temporary directory. Then
remove foo's parent directory completely with: rd <parent of foo> /s. The
/s switch for rd removes the named directory and everything within it:
subdirectories, files and all - including foo.

In the "DOS" window, you can see a mini-Help file showing the switches
available for each command by typing the command followed by /?. So, type
dir /? or rd /? to see the switches and what each one does.

If that doesn't work for you, please post back with details of what you
tried and what results you saw.

RC
--
R. C. White, CPA
San Marcos, TX
(E-Mail Removed)
Microsoft Windows MVP

"Brian Kelly" <(E-Mail Removed)> wrote in message
news:HZOdnUL-R6-(E-Mail Removed)...
>I have a directory entry that appears to have somehow become corrupted and
> cannot be deleted or other wise affected.
>
> It was created by CheckDsk at some point. The only thing I can do to it
> is
> rename it (which I have, to "foo"). Anything else causes an error.
>
> --Trying to delete in Windows Explorer returns: "Cannot delete foo: The
> directory name is invalid."
> --Trying to delete from a command prompt returns: "The directory name is
> invalid."
> --Trying to access the directory in Windows Explorer returns: "D:\foo is
> not accessible. The directory name is invalid."
> --Trying to change to the directory via command prompt (CD) returns: "The
> directory name is invalid."
>
> I have run another check disk, to no avail.
>
> Any thoughts?
>
> Thanks,
> Brian


 
Reply With Quote
 
Brian Kelly
Guest
Posts: n/a
 
      7th May 2004
Thanks for the suggestions. I have actually gone down these roads, but was
trying to keep the problem description simple in the hopes of a quick answer
without having to post a novel.

Anyway, here are the results to the various other approaches

--I realize the directory created by checkdsk is worthless; I am just trying
to kill it.

--I placed "foo" in D:\test and tried deleting D:\test from Windows
Explorer--received same error as previously: Cannot delete foo. The
directory name is invalid.

--I tried deleting "D:\test" using a command prompt (rmdir /s test)--after
answering the prompt (Are you sure?), received the error: test\foo - The
directory name is invalid.

--Attempted to get the short file name with dir /x. There is none listed.
I suppose the short file name could be a space or tab or something and I
would not know, of course, but I do not think that you can put a non-visible
character in a SFN.

As further information, this is a Win2K Pro box with NTFS file system.

Thanks for your continued ideas,
Brian

"R. C. White" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi, Brian.
>
> When ChkDsk finds a "lost chain" that looks like a directory, it gives the
> lost chain the name FOUND.001; later such lost chains are named FOUND.002,
> etc. If you recognize the filenames in FOUND.001, you may be able to

rename
> the directory and then Move it back into the parent directory where it
> belongs. In most cases, though, the information is incomplete or wrong -

in
> other words, useless. It may be salvageable, but at such a high cost of
> time and effort that it should be considered a total loss. Since ChkDsk

has
> already give it its best shot, further iterations of ChkDsk are not likely
> to do any good.
>
> From the Command prompt, type: dir foo*.* /x. The /x switch should

produce
> an extra column in the directory listing, showing the Short File Name

(SFN),
> also known as the 8.3 filename, before the LFN. Even short filenames are
> considered LFNs if they contain any characters (including spaces) that are
> not allowed in a valid MS-DOS filename. Then Remove the SFN.
>
> Remember that Del deletes FILES; rd (or rmdir) removes DIRECTORIES. So

the
> proper command is: rd foo
>
> If that doesn't work, then isolate this directory in a parent directory

that
> contains nothing else. Either Move foo or, if you can't to that, then

move
> everything except foo from that directory to a temporary directory. Then
> remove foo's parent directory completely with: rd <parent of foo> /s.

The
> /s switch for rd removes the named directory and everything within it:
> subdirectories, files and all - including foo.
>
> In the "DOS" window, you can see a mini-Help file showing the switches
> available for each command by typing the command followed by /?. So, type
> dir /? or rd /? to see the switches and what each one does.
>
> If that doesn't work for you, please post back with details of what you
> tried and what results you saw.
>
> RC
> --
> R. C. White, CPA
> San Marcos, TX
> (E-Mail Removed)
> Microsoft Windows MVP
>
> "Brian Kelly" <(E-Mail Removed)> wrote in message
> news:HZOdnUL-R6-(E-Mail Removed)...
> >I have a directory entry that appears to have somehow become corrupted

and
> > cannot be deleted or other wise affected.
> >
> > It was created by CheckDsk at some point. The only thing I can do to it
> > is
> > rename it (which I have, to "foo"). Anything else causes an error.
> >
> > --Trying to delete in Windows Explorer returns: "Cannot delete foo:

The
> > directory name is invalid."
> > --Trying to delete from a command prompt returns: "The directory name

is
> > invalid."
> > --Trying to access the directory in Windows Explorer returns: "D:\foo

is
> > not accessible. The directory name is invalid."
> > --Trying to change to the directory via command prompt (CD) returns:

"The
> > directory name is invalid."
> >
> > I have run another check disk, to no avail.
> >
> > Any thoughts?
> >
> > Thanks,
> > Brian

>



 
Reply With Quote
 
R. C. White
Guest
Posts: n/a
 
      7th May 2004
Hi, Brian.

> --I tried deleting "D:\test" using a command prompt (rmdir /s test)--after
> answering the prompt (Are you sure?), received the error: test\foo - The
> directory name is invalid.


This works fine for me. (Don't you just love messages like that?)

> --Attempted to get the short file name with dir /x. There is none listed.


Yeah. Me, too. But, of course, my "foo" was just created from my typing,
so I already know there were no strange characters in it. If the name had
been created by some other process, who knows what might have appeared.

> I suppose the short file name could be a space or tab or something and I
> would not know, of course, but I do not think that you can put a
> non-visible
> character in a SFN.


Spaces don't show up. Characters (visible or not) that are not allowed in
an 8.3 filename are automatically converted to ASCII.

I've run out of ideas down that rd <SFN> road, I'm afraid. Let's back up a
couple of steps.

What was the directory name before you changed it? FOUND.001? Or something
similar - or quite different? HOW did you rename it to "foo": Command
prompt? Windows Explorer? You said you could rename it to "foo", but
"Anything else causes an error." What error? All these symptoms seem very
strange to me. Are you sure you don't have a virus or other malware?

I upgraded from Win2K to WinXP on the day it came out, but they should
behave the same in this regard. I studied FAT in depth back when hard
drives were new and undependable, and rebuilt my share of FATs and
directories, byte by byte, using Norton's DiskEdit, but haven't had to learn
NTFS that well.

RC
--
R. C. White, CPA
San Marcos, TX
(E-Mail Removed)
Microsoft Windows MVP

"Brian Kelly" <(E-Mail Removed)> wrote in message
news:aeCdnXOQXqEGLgbdRVn-(E-Mail Removed)...
> Thanks for the suggestions. I have actually gone down these roads, but
> was
> trying to keep the problem description simple in the hopes of a quick
> answer
> without having to post a novel.
>
> Anyway, here are the results to the various other approaches
>
> --I realize the directory created by checkdsk is worthless; I am just
> trying
> to kill it.
>
> --I placed "foo" in D:\test and tried deleting D:\test from Windows
> Explorer--received same error as previously: Cannot delete foo. The
> directory name is invalid.
>
> --I tried deleting "D:\test" using a command prompt (rmdir /s test)--after
> answering the prompt (Are you sure?), received the error: test\foo - The
> directory name is invalid.
>
> --Attempted to get the short file name with dir /x. There is none listed.
> I suppose the short file name could be a space or tab or something and I
> would not know, of course, but I do not think that you can put a
> non-visible
> character in a SFN.
>
> As further information, this is a Win2K Pro box with NTFS file system.
>
> Thanks for your continued ideas,
> Brian
>
> "R. C. White" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> Hi, Brian.
>>
>> When ChkDsk finds a "lost chain" that looks like a directory, it gives
>> the
>> lost chain the name FOUND.001; later such lost chains are named
>> FOUND.002,
>> etc. If you recognize the filenames in FOUND.001, you may be able to

> rename
>> the directory and then Move it back into the parent directory where it
>> belongs. In most cases, though, the information is incomplete or wrong -

> in
>> other words, useless. It may be salvageable, but at such a high cost of
>> time and effort that it should be considered a total loss. Since ChkDsk

> has
>> already give it its best shot, further iterations of ChkDsk are not
>> likely
>> to do any good.
>>
>> From the Command prompt, type: dir foo*.* /x. The /x switch should

> produce
>> an extra column in the directory listing, showing the Short File Name

> (SFN),
>> also known as the 8.3 filename, before the LFN. Even short filenames are
>> considered LFNs if they contain any characters (including spaces) that
>> are
>> not allowed in a valid MS-DOS filename. Then Remove the SFN.
>>
>> Remember that Del deletes FILES; rd (or rmdir) removes DIRECTORIES. So

> the
>> proper command is: rd foo
>>
>> If that doesn't work, then isolate this directory in a parent directory

> that
>> contains nothing else. Either Move foo or, if you can't to that, then

> move
>> everything except foo from that directory to a temporary directory. Then
>> remove foo's parent directory completely with: rd <parent of foo> /s.

> The
>> /s switch for rd removes the named directory and everything within it:
>> subdirectories, files and all - including foo.
>>
>> In the "DOS" window, you can see a mini-Help file showing the switches
>> available for each command by typing the command followed by /?. So,
>> type
>> dir /? or rd /? to see the switches and what each one does.
>>
>> If that doesn't work for you, please post back with details of what you
>> tried and what results you saw.
>>
>> RC
>>
>> "Brian Kelly" <(E-Mail Removed)> wrote in message
>> news:HZOdnUL-R6-(E-Mail Removed)...
>> >I have a directory entry that appears to have somehow become corrupted

> and
>> > cannot be deleted or other wise affected.
>> >
>> > It was created by CheckDsk at some point. The only thing I can do to
>> > it
>> > is
>> > rename it (which I have, to "foo"). Anything else causes an error.
>> >
>> > --Trying to delete in Windows Explorer returns: "Cannot delete foo:

> The
>> > directory name is invalid."
>> > --Trying to delete from a command prompt returns: "The directory name

> is
>> > invalid."
>> > --Trying to access the directory in Windows Explorer returns: "D:\foo

> is
>> > not accessible. The directory name is invalid."
>> > --Trying to change to the directory via command prompt (CD) returns:

> "The
>> > directory name is invalid."
>> >
>> > I have run another check disk, to no avail.
>> >
>> > Any thoughts?
>> >
>> > Thanks,
>> > Brian


 
Reply With Quote
 
Brian Kelly
Guest
Posts: n/a
 
      7th May 2004
The original name was "FOUND.001" or something similar (might have been
..002).

By "You said you could rename it to "foo", but "Anything else causes an
error."" I mean that I can rename it to anything I want without a problem,
but trying to delete it with RD (or DEL, which, with /S, should work if I
put it in D:\Test and type DEL /s D:\Test) gives an error.

I guess I need to hunt down some sort of low-level NTFS utility that can go
figure out what is wrong with the directory and fix it up.

"R. C. White" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> Hi, Brian.
>
> > --I tried deleting "D:\test" using a command prompt (rmdir /s

test)--after
> > answering the prompt (Are you sure?), received the error: test\foo -

The
> > directory name is invalid.

>
> This works fine for me. (Don't you just love messages like that?)
>
> > --Attempted to get the short file name with dir /x. There is none

listed.
>
> Yeah. Me, too. But, of course, my "foo" was just created from my typing,
> so I already know there were no strange characters in it. If the name had
> been created by some other process, who knows what might have appeared.
>
> > I suppose the short file name could be a space or tab or something and I
> > would not know, of course, but I do not think that you can put a
> > non-visible
> > character in a SFN.

>
> Spaces don't show up. Characters (visible or not) that are not allowed in
> an 8.3 filename are automatically converted to ASCII.
>
> I've run out of ideas down that rd <SFN> road, I'm afraid. Let's back up

a
> couple of steps.
>
> What was the directory name before you changed it? FOUND.001? Or

something
> similar - or quite different? HOW did you rename it to "foo": Command
> prompt? Windows Explorer? You said you could rename it to "foo", but
> "Anything else causes an error." What error? All these symptoms seem

very
> strange to me. Are you sure you don't have a virus or other malware?
>
> I upgraded from Win2K to WinXP on the day it came out, but they should
> behave the same in this regard. I studied FAT in depth back when hard
> drives were new and undependable, and rebuilt my share of FATs and
> directories, byte by byte, using Norton's DiskEdit, but haven't had to

learn
> NTFS that well.
>
> RC
> --
> R. C. White, CPA
> San Marcos, TX
> (E-Mail Removed)
> Microsoft Windows MVP
>
> "Brian Kelly" <(E-Mail Removed)> wrote in message
> news:aeCdnXOQXqEGLgbdRVn-(E-Mail Removed)...
> > Thanks for the suggestions. I have actually gone down these roads, but
> > was
> > trying to keep the problem description simple in the hopes of a quick
> > answer
> > without having to post a novel.
> >
> > Anyway, here are the results to the various other approaches
> >
> > --I realize the directory created by checkdsk is worthless; I am just
> > trying
> > to kill it.
> >
> > --I placed "foo" in D:\test and tried deleting D:\test from Windows
> > Explorer--received same error as previously: Cannot delete foo. The
> > directory name is invalid.
> >
> > --I tried deleting "D:\test" using a command prompt (rmdir /s

test)--after
> > answering the prompt (Are you sure?), received the error: test\foo -

The
> > directory name is invalid.
> >
> > --Attempted to get the short file name with dir /x. There is none

listed.
> > I suppose the short file name could be a space or tab or something and I
> > would not know, of course, but I do not think that you can put a
> > non-visible
> > character in a SFN.
> >
> > As further information, this is a Win2K Pro box with NTFS file system.
> >
> > Thanks for your continued ideas,
> > Brian
> >
> > "R. C. White" <(E-Mail Removed)> wrote in message
> > news:(E-Mail Removed)...
> >> Hi, Brian.
> >>
> >> When ChkDsk finds a "lost chain" that looks like a directory, it gives
> >> the
> >> lost chain the name FOUND.001; later such lost chains are named
> >> FOUND.002,
> >> etc. If you recognize the filenames in FOUND.001, you may be able to

> > rename
> >> the directory and then Move it back into the parent directory where it
> >> belongs. In most cases, though, the information is incomplete or

wrong -
> > in
> >> other words, useless. It may be salvageable, but at such a high cost

of
> >> time and effort that it should be considered a total loss. Since

ChkDsk
> > has
> >> already give it its best shot, further iterations of ChkDsk are not
> >> likely
> >> to do any good.
> >>
> >> From the Command prompt, type: dir foo*.* /x. The /x switch should

> > produce
> >> an extra column in the directory listing, showing the Short File Name

> > (SFN),
> >> also known as the 8.3 filename, before the LFN. Even short filenames

are
> >> considered LFNs if they contain any characters (including spaces) that
> >> are
> >> not allowed in a valid MS-DOS filename. Then Remove the SFN.
> >>
> >> Remember that Del deletes FILES; rd (or rmdir) removes DIRECTORIES. So

> > the
> >> proper command is: rd foo
> >>
> >> If that doesn't work, then isolate this directory in a parent directory

> > that
> >> contains nothing else. Either Move foo or, if you can't to that, then

> > move
> >> everything except foo from that directory to a temporary directory.

Then
> >> remove foo's parent directory completely with: rd <parent of foo> /s.

> > The
> >> /s switch for rd removes the named directory and everything within it:
> >> subdirectories, files and all - including foo.
> >>
> >> In the "DOS" window, you can see a mini-Help file showing the switches
> >> available for each command by typing the command followed by /?. So,
> >> type
> >> dir /? or rd /? to see the switches and what each one does.
> >>
> >> If that doesn't work for you, please post back with details of what you
> >> tried and what results you saw.
> >>
> >> RC
> >>
> >> "Brian Kelly" <(E-Mail Removed)> wrote in message
> >> news:HZOdnUL-R6-(E-Mail Removed)...
> >> >I have a directory entry that appears to have somehow become corrupted

> > and
> >> > cannot be deleted or other wise affected.
> >> >
> >> > It was created by CheckDsk at some point. The only thing I can do to
> >> > it
> >> > is
> >> > rename it (which I have, to "foo"). Anything else causes an error.
> >> >
> >> > --Trying to delete in Windows Explorer returns: "Cannot delete foo:

> > The
> >> > directory name is invalid."
> >> > --Trying to delete from a command prompt returns: "The directory

name
> > is
> >> > invalid."
> >> > --Trying to access the directory in Windows Explorer returns:

"D:\foo
> > is
> >> > not accessible. The directory name is invalid."
> >> > --Trying to change to the directory via command prompt (CD) returns:

> > "The
> >> > directory name is invalid."
> >> >
> >> > I have run another check disk, to no avail.
> >> >
> >> > Any thoughts?
> >> >
> >> > Thanks,
> >> > Brian

>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Corrupt system32 directory Doug Windows XP Security 2 17th Feb 2008 11:07 AM
Corrupt directory? Saga Windows XP General 6 25th Apr 2006 03:38 PM
Active Directory Corrupt =?Utf-8?B?QW5kcmVpIE1hcmFrbG92?= Microsoft Windows 2000 Active Directory 1 16th Jul 2005 10:04 PM
Corrupt directory MrB Windows XP General 3 7th Aug 2004 12:02 AM
Corrupt Directory and DirectoryInfo Pete Microsoft Dot NET 3 26th Feb 2004 07:53 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:36 PM.