Need help deleting file with bad filename - Windows NT

This is a discussion on Need help deleting file with bad filename - Windows NT ; I don't know how it happened, but I have a file on the Windows 2000 Professional machine that has a colon in the name itself. Nothing I've tried with Windows Explorer will touch the file. I tried a few wildcard ...

+ Reply to Thread
Results 1 to 8 of 8

Thread: Need help deleting file with bad filename

  1. Need help deleting file with bad filename

    I don't know how it happened, but I have a file on the Windows 2000
    Professional machine that has a colon in the name itself. Nothing I've
    tried with Windows Explorer will touch the file. I tried a few
    wildcard tricks from the command line, but couldn't get that to work
    either.

    Any ideas on how to delete the file?

    TIA
    Tom

  2. Re: Need help deleting file with bad filename


    "Tom Bates" wrote in message
    news:4igugv46usnuuqp09i9kijc7gtb7l1alvg@4ax.com...
    > I don't know how it happened, but I have a file on the Windows 2000
    > Professional machine that has a colon in the name itself. Nothing I've
    > tried with Windows Explorer will touch the file. I tried a few
    > wildcard tricks from the command line, but couldn't get that to work
    > either.
    >
    > Any ideas on how to delete the file?
    >
    > TIA
    > Tom


    This may help when executed from a Command Prompt:

    del \\.\c:\Tom:Bates.txt

    I would also run chkdsk.exe /f.



  3. Re: Need help deleting file with bad filename

    Thanks for the pointers. Unfortunately, no success yet.

    Here's some console output that may show something I perhaps
    overlooked in my earlier description:

    ------------------
    D:\temp\bad filename>dir
    Volume in drive D is D-Drive
    Volume Serial Number is D1C3-E526

    Directory of D:\temp\bad filename

    07/11/2003 03:08p .
    07/11/2003 03:08p ..
    05/09/2002 08:59p 36,049 0:.jpg
    1 File(s) 36,049 bytes
    2 Dir(s) 3,240,206,336 bytes free

    D:\temp\bad filename>del "\\.\d:\temp\bad filename\*.jpg"
    \\.\d:\temp\bad filename\0:.jpg
    The system cannot find the file specified.

    D:\temp\bad filename>cd ..
    D:\temp>del "\\.\d:\temp\bad filename"
    \\.\d:\temp\bad filename\*, Are you sure (Y/N)? y
    \\.\d:\temp\bad filename\0:.jpg
    The system cannot find the file specified.

    Attempts with and without the leading "\\.\" had the same results.
    Also, trying to delete the parent directory in Explorer didn't work
    either.

    Chkdsk didn't want to touch the drive, as it's a mounted NTFS volume,
    but it did offer to schedule a chkdsk for the next boot, so I agreed
    and rebooted. Chkdsk did run, but it didn't appear to detect any
    problems. The system came up with the file still there.

    It's no big deal since it's the only file in that folder and it's
    small, but I'm just surprised that I've never come across this before,
    and I've been working with DOS since version 2.

    Appreciate any insight.
    Thanks
    Tom

  4. Re: Need help deleting file with bad filename

    In such a case I would probably pull out my Acronis
    Disk Editor and use it to modify the offending colon
    by direct disk access.


    "Tom Bates" wrote in message
    news:keuugvg23i5a1k405ktmausk76unni35q6@4ax.com...
    > Thanks for the pointers. Unfortunately, no success yet.
    >
    > Here's some console output that may show something I perhaps
    > overlooked in my earlier description:
    >
    > ------------------
    > D:\temp\bad filename>dir
    > Volume in drive D is D-Drive
    > Volume Serial Number is D1C3-E526
    >
    > Directory of D:\temp\bad filename
    >
    > 07/11/2003 03:08p
    .
    > 07/11/2003 03:08p
    ..
    > 05/09/2002 08:59p 36,049 0:.jpg
    > 1 File(s) 36,049 bytes
    > 2 Dir(s) 3,240,206,336 bytes free
    >
    > D:\temp\bad filename>del "\\.\d:\temp\bad filename\*.jpg"
    > \\.\d:\temp\bad filename\0:.jpg
    > The system cannot find the file specified.
    >
    > D:\temp\bad filename>cd ..
    > D:\temp>del "\\.\d:\temp\bad filename"
    > \\.\d:\temp\bad filename\*, Are you sure (Y/N)? y
    > \\.\d:\temp\bad filename\0:.jpg
    > The system cannot find the file specified.
    >
    > Attempts with and without the leading "\\.\" had the same results.
    > Also, trying to delete the parent directory in Explorer didn't work
    > either.
    >
    > Chkdsk didn't want to touch the drive, as it's a mounted NTFS volume,
    > but it did offer to schedule a chkdsk for the next boot, so I agreed
    > and rebooted. Chkdsk did run, but it didn't appear to detect any
    > problems. The system came up with the file still there.
    >
    > It's no big deal since it's the only file in that folder and it's
    > small, but I'm just surprised that I've never come across this before,
    > and I've been working with DOS since version 2.
    >
    > Appreciate any insight.
    > Thanks
    > Tom




  5. Re: Need help deleting file with bad filename

    In article <4igugv46usnuuqp09i9kijc7gtb7l1alvg@4ax.com>, noneedto@email.me
    says...
    > I don't know how it happened, but I have a file on the Windows 2000
    > Professional machine that has a colon in the name itself. Nothing I've
    > tried with Windows Explorer will touch the file. I tried a few
    > wildcard tricks from the command line, but couldn't get that to work
    > either.
    >
    > Any ideas on how to delete the file?


    Have you tried renaming it first, possibly by using a wildcard in place
    of the colon?

    REN bad?file goodfile
    DEL goodfile

    It might also help to have quotes around it:
    REN "bad?file" goodfile

    Alternately, what is the short file name? Just do
    DIR /X

    Then use the short filename to delete.

    --
    If there is a no_junk in my address, please REMOVE it before replying!
    All junk mail senders will be prosecuted to the fullest extent of the
    law!!
    http://home.att.net/~andyross

  6. Re: Need help deleting file with bad filename

    On Fri, 11 Jul 2003 20:09:42 -0700, Tom Bates
    wrote:

    >Thanks for the pointers. Unfortunately, no success yet.
    >
    >Here's some console output that may show something I perhaps
    >overlooked in my earlier description:
    >
    >------------------
    >D:\temp\bad filename>dir
    > Volume in drive D is D-Drive
    > Volume Serial Number is D1C3-E526
    >
    > Directory of D:\temp\bad filename
    >
    >07/11/2003 03:08p
    .
    >07/11/2003 03:08p
    ..
    >05/09/2002 08:59p 36,049 0:.jpg
    > 1 File(s) 36,049 bytes
    > 2 Dir(s) 3,240,206,336 bytes free
    >
    >D:\temp\bad filename>del "\\.\d:\temp\bad filename\*.jpg"
    >\\.\d:\temp\bad filename\0:.jpg
    >The system cannot find the file specified.
    >
    >D:\temp\bad filename>cd ..
    >D:\temp>del "\\.\d:\temp\bad filename"
    >\\.\d:\temp\bad filename\*, Are you sure (Y/N)? y
    >\\.\d:\temp\bad filename\0:.jpg
    >The system cannot find the file specified.
    >
    >Attempts with and without the leading "\\.\" had the same results.
    >Also, trying to delete the parent directory in Explorer didn't work
    >either.
    >
    >Chkdsk didn't want to touch the drive, as it's a mounted NTFS volume,
    >but it did offer to schedule a chkdsk for the next boot, so I agreed
    >and rebooted. Chkdsk did run, but it didn't appear to detect any
    >problems. The system came up with the file still there.
    >
    >It's no big deal since it's the only file in that folder and it's
    >small, but I'm just surprised that I've never come across this before,
    >and I've been working with DOS since version 2.
    >


    Since it's the only file in there, have you tried using "*.*" instead
    of specifying any part of the name?




  7. Re: Need help deleting file with bad filename


    (snip)

    > It's no big deal since it's the only file in that folder and it's
    > small, but I'm just surprised that I've never come across this before,
    > and I've been working with DOS since version 2.


    I remember in some version of DOS trying to delete COM3.* for various values
    of *. Created when no COM3 device existed, but then later it did exist.

    I don't know if it will help, but you might try quotes. They are needed to
    delete files with spaces in the names.

    -- glen



  8. Re: Need help deleting file with bad filename


    "Tom Bates" wrote in message
    news:keuugvg23i5a1k405ktmausk76unni35q6@4ax.com...
    > Thanks for the pointers. Unfortunately, no success yet.
    >
    > Here's some console output that may show something I perhaps
    > overlooked in my earlier description:
    >
    > ------------------
    > D:\temp\bad filename>dir
    > Volume in drive D is D-Drive
    > Volume Serial Number is D1C3-E526
    >
    > Directory of D:\temp\bad filename
    >
    > 07/11/2003 03:08p
    .
    > 07/11/2003 03:08p
    ..
    > 05/09/2002 08:59p 36,049 0:.jpg
    > 1 File(s) 36,049 bytes
    > 2 Dir(s) 3,240,206,336 bytes free
    >
    > D:\temp\bad filename>del "\\.\d:\temp\bad filename\*.jpg"
    > \\.\d:\temp\bad filename\0:.jpg
    > The system cannot find the file specified.
    >
    > D:\temp\bad filename>cd ..
    > D:\temp>del "\\.\d:\temp\bad filename"
    > \\.\d:\temp\bad filename\*, Are you sure (Y/N)? y
    > \\.\d:\temp\bad filename\0:.jpg
    > The system cannot find the file specified.
    >
    > Attempts with and without the leading "\\.\" had the same results.
    > Also, trying to delete the parent directory in Explorer didn't work
    > either.
    >
    > Chkdsk didn't want to touch the drive, as it's a mounted NTFS volume,
    > but it did offer to schedule a chkdsk for the next boot, so I agreed
    > and rebooted. Chkdsk did run, but it didn't appear to detect any
    > problems. The system came up with the file still there.
    >
    > It's no big deal since it's the only file in that folder and it's
    > small, but I'm just surprised that I've never come across this before,
    > and I've been working with DOS since version 2.
    >
    > Appreciate any insight.
    > Thanks
    > Tom


    With considerable difficulty I generated a file name like yours,
    with an embedded colon. None of the usual commands would
    then touch the file - I could not even remove the folder where the
    file was located. I subsequently found two ways to resolve the
    situation:

    a) Using a disk editing tool.
    b) Using scandisk under Win98. This won't work for you because
    your file system is NTFS, not FAT.

    Strangely enough, chkdsk.exe /f found nothing wrong with the
    file name . . .





+ Reply to Thread