Re: Corrupt Directory?

From: Brian Kelly (bkelly_at_speedfactory.net)
Date: 05/07/04

  • Next message: Ashok Nair [MSFT]: "RE: Sharing Folder and Files"
    Date: Fri, 7 May 2004 14:42:01 -0400
    
    

    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" <RCWhite@msn.com> wrote in message
    news:%23kBJM3FNEHA.2640@TK2MSFTNGP12.phx.gbl...
    > 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
    > rc@corridor.net
    > Microsoft Windows MVP
    >
    > "Brian Kelly" <bkelly@speedfactory.net> wrote in message
    > news:aeCdnXOQXqEGLgbdRVn-uw@speedfactory.net...
    > > 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" <RCWhite@msn.com> wrote in message
    > > news:urltdmENEHA.3712@TK2MSFTNGP10.phx.gbl...
    > >> 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" <bkelly@speedfactory.net> wrote in message
    > >> news:HZOdnUL-R6-GAAbd4p2dnA@speedfactory.net...
    > >> >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
    >


  • Next message: Ashok Nair [MSFT]: "RE: Sharing Folder and Files"

    Relevant Pages

    • Re: File Extensions
      ... and see what the first few characters are. ... Then rename that file accordingly. ... Dim Buffer As String * 64 ... Dim myExt As String ...
      (microsoft.public.excel.programming)
    • Re: Name function in Access 2002 (XP)
      ... There are *myriads* of reasons that a rename can fail, ... the new file name is invalid; ... The VBA errors are very specific when there is a problem. ...
      (microsoft.public.access.formscoding)
    • RE: Post Code UK Structure Verification
      ... Dim invalid As Boolean ... ' Validate inner code ..... ... Notepad is used because copying from ... Sort to bring to the top records with too many characters ...
      (microsoft.public.excel.programming)
    • Re: [PHP] One last try at this!
      ... Jim Lucas wrote: ... "Invalid Characters" So $result now contains the value 'Invalid Characters'. ... At one point he mentioned changing ValidateString() to return false on an error. ...
      (php.general)
    • Re: trouble joining exchange 5.5 domain
      ... There might be some old data in AD that references the invalid domain name. ... A SKCC might be required. ... > message when trying to add an exchange 2000 server to the ... > greater than 64 characters or contains at least one of the ...
      (microsoft.public.exchange.misc)