Cannot delete files with invalid filenames

Archived from groups: microsoft.public.win2000.file_system (More info?)

Hi,


We are trying to delete a number of files on a Windows 2000 Server with
NTFS. They are in a short path, and all have illegal filenames (appeared
AFTER a successful checkdisk that ran after a RAID disk crash). For example
E:\users\joebloggs\M0?Z?KHE.GIF


Nothing has worked: we have tried the posix deletion tools, deleting the
directory itself, using \\?\ and \\.\ syntax to access them as all suggested
by MS.


Any ideas?
4 answers Last reply
More about cannot delete files invalid filenames
  1. Archived from groups: microsoft.public.win2000.file_system (More info?)

    Open up a command prompt and type 'dir /x'. This will list you the short
    path name of the file.
    Run a 'del' command on the shortpath name.

    --
    Cheers
    Check Abdoul [VC++ MVP]
    -----------------------------------

    "Hakan Aysan" <hakan.aysan@btinternet.com> wrote in message
    news:eo7GMKFEFHA.3992@tk2msftngp13.phx.gbl...
    > Hi,
    >
    >
    > We are trying to delete a number of files on a Windows 2000 Server with
    > NTFS. They are in a short path, and all have illegal filenames (appeared
    > AFTER a successful checkdisk that ran after a RAID disk crash). For
    example
    > E:\users\joebloggs\M0?Z?KHE.GIF
    >
    >
    > Nothing has worked: we have tried the posix deletion tools, deleting the
    > directory itself, using \\?\ and \\.\ syntax to access them as all
    suggested
    > by MS.
    >
    >
    > Any ideas?
    >
    >
  2. Archived from groups: microsoft.public.win2000.file_system (More info?)

    Hi,


    We've tried dir /x, but the files are 8.3, and dir /x doesn't list a short
    file name. Every deletion tool and syntax basically says "The filename,
    directory name, or volume label syntax is incorrect."

    Surely there must be a way to delete these files? There is a knowledgebase
    article number 320081 which is quite comprehensive on this subject, but
    nothing suggested there works here. I should also say that checkdisk has
    been run several times, and reports no problems at all. There are literally
    11 files corrupt in this form, the rest of the disk and data is fine.


    Thanks for any suggestions!


    "CheckAbdoul" <checkabdoul at mvps dot org> wrote in message
    news:OcVzMeHEFHA.3032@TK2MSFTNGP12.phx.gbl...
    > Open up a command prompt and type 'dir /x'. This will list you the
    > short
    > path name of the file.
    > Run a 'del' command on the shortpath name.
    >
    > --
    > Cheers
    > Check Abdoul [VC++ MVP]
    > -----------------------------------
    >
    > "Hakan Aysan" <hakan.aysan@btinternet.com> wrote in message
    > news:eo7GMKFEFHA.3992@tk2msftngp13.phx.gbl...
    >> Hi,
    >>
    >>
    >> We are trying to delete a number of files on a Windows 2000 Server with
    >> NTFS. They are in a short path, and all have illegal filenames (appeared
    >> AFTER a successful checkdisk that ran after a RAID disk crash). For
    > example
    >> E:\users\joebloggs\M0?Z?KHE.GIF
    >>
    >>
    >> Nothing has worked: we have tried the posix deletion tools, deleting the
    >> directory itself, using \\?\ and \\.\ syntax to access them as all
    > suggested
    >> by MS.
    >>
    >>
    >> Any ideas?
    >>
    >>
    >
    >
  3. Archived from groups: microsoft.public.win2000.file_system (More info?)

    Hi, Hakan.

    Have you tried isolating these file in a folder, then removing the folder?

    In a "DOS" window, use the rd command with the /s switch to remove the
    entire directory tree, subdirectories, files and all. Before you do it, of
    course, make sure that everything you DO want to keep has been moved to some
    other directory.

    rd <foldername> /s

    >>> E:\users\joebloggs\M0?Z?KHE.GIF
    rd e:\users\joebloggs /s

    RC
    --
    R. C. White, CPA
    San Marcos, TX
    rc@corridor.net
    Microsoft Windows MVP

    "Hakan Aysan" <hakan.aysan@btinternet.com> wrote in message
    news:%23sOv9jJEFHA.4052@TK2MSFTNGP09.phx.gbl...
    > Hi,
    >
    >
    > We've tried dir /x, but the files are 8.3, and dir /x doesn't list a short
    > file name. Every deletion tool and syntax basically says "The filename,
    > directory name, or volume label syntax is incorrect."
    >
    > Surely there must be a way to delete these files? There is a knowledgebase
    > article number 320081 which is quite comprehensive on this subject, but
    > nothing suggested there works here. I should also say that checkdisk has
    > been run several times, and reports no problems at all. There are
    > literally 11 files corrupt in this form, the rest of the disk and data is
    > fine.
    >
    >
    > Thanks for any suggestions!
    >
    >
    > "CheckAbdoul" <checkabdoul at mvps dot org> wrote in message
    > news:OcVzMeHEFHA.3032@TK2MSFTNGP12.phx.gbl...
    >> Open up a command prompt and type 'dir /x'. This will list you the
    >> short
    >> path name of the file.
    >> Run a 'del' command on the shortpath name.
    >>
    >> --
    >> Cheers
    >> Check Abdoul [VC++ MVP]
    >> -----------------------------------
    >>
    >> "Hakan Aysan" <hakan.aysan@btinternet.com> wrote in message
    >> news:eo7GMKFEFHA.3992@tk2msftngp13.phx.gbl...
    >>> Hi,
    >>>
    >>>
    >>> We are trying to delete a number of files on a Windows 2000 Server with
    >>> NTFS. They are in a short path, and all have illegal filenames (appeared
    >>> AFTER a successful checkdisk that ran after a RAID disk crash). For
    >> example
    >>> E:\users\joebloggs\M0?Z?KHE.GIF
    >>>
    >>>
    >>> Nothing has worked: we have tried the posix deletion tools, deleting the
    >>> directory itself, using \\?\ and \\.\ syntax to access them as all
    >> suggested
    >>> by MS.
    >>>
    >>>
    >>> Any ideas?
  4. Archived from groups: microsoft.public.win2000.file_system (More info?)

    Just tried that. Again, an error complaining about invalid filenames.


    "R. C. White" <rc@corridor.net> wrote in message
    news:uKUfUUjEFHA.2232@TK2MSFTNGP14.phx.gbl...
    > Hi, Hakan.
    >
    > Have you tried isolating these file in a folder, then removing the folder?
    >
    > In a "DOS" window, use the rd command with the /s switch to remove the
    > entire directory tree, subdirectories, files and all. Before you do it,
    > of course, make sure that everything you DO want to keep has been moved to
    > some other directory.
    >
    > rd <foldername> /s
    >
    >>>> E:\users\joebloggs\M0?Z?KHE.GIF
    > rd e:\users\joebloggs /s
    >
    > RC
    > --
    > R. C. White, CPA
    > San Marcos, TX
    > rc@corridor.net
    > Microsoft Windows MVP
    >
    > "Hakan Aysan" <hakan.aysan@btinternet.com> wrote in message
    > news:%23sOv9jJEFHA.4052@TK2MSFTNGP09.phx.gbl...
    >> Hi,
    >>
    >>
    >> We've tried dir /x, but the files are 8.3, and dir /x doesn't list a
    >> short file name. Every deletion tool and syntax basically says "The
    >> filename, directory name, or volume label syntax is incorrect."
    >>
    >> Surely there must be a way to delete these files? There is a
    >> knowledgebase article number 320081 which is quite comprehensive on this
    >> subject, but nothing suggested there works here. I should also say that
    >> checkdisk has been run several times, and reports no problems at all.
    >> There are literally 11 files corrupt in this form, the rest of the disk
    >> and data is fine.
    >>
    >>
    >> Thanks for any suggestions!
    >>
    >>
    >> "CheckAbdoul" <checkabdoul at mvps dot org> wrote in message
    >> news:OcVzMeHEFHA.3032@TK2MSFTNGP12.phx.gbl...
    >>> Open up a command prompt and type 'dir /x'. This will list you the
    >>> short
    >>> path name of the file.
    >>> Run a 'del' command on the shortpath name.
    >>>
    >>> --
    >>> Cheers
    >>> Check Abdoul [VC++ MVP]
    >>> -----------------------------------
    >>>
    >>> "Hakan Aysan" <hakan.aysan@btinternet.com> wrote in message
    >>> news:eo7GMKFEFHA.3992@tk2msftngp13.phx.gbl...
    >>>> Hi,
    >>>>
    >>>>
    >>>> We are trying to delete a number of files on a Windows 2000 Server with
    >>>> NTFS. They are in a short path, and all have illegal filenames
    >>>> (appeared
    >>>> AFTER a successful checkdisk that ran after a RAID disk crash). For
    >>> example
    >>>> E:\users\joebloggs\M0?Z?KHE.GIF
    >>>>
    >>>>
    >>>> Nothing has worked: we have tried the posix deletion tools, deleting
    >>>> the
    >>>> directory itself, using \\?\ and \\.\ syntax to access them as all
    >>> suggested
    >>>> by MS.
    >>>>
    >>>>
    >>>> Any ideas?
    >
Ask a new question

Read More

Windows