Unable to delete folder with too long name

Discussion in 'Windows Vista Performance' started by sunil, Nov 15, 2009.

  1. sunil

    sunil Guest

    Dear Sir,

    Eclipse has created folder inside folder recusively. Now I am not able to
    delete this folder using neither 'Windows Explorer' nor using command prompt
    using RMDIR/S.
    It tells names of folder is too long.

    Pleasew help me in how to delete it.

    sunil, Nov 15, 2009
    1. Advertisements

  2. sunil

    Gil Tennant Guest

    It could be created by Malware, which still has it open..

    Try: http://ccollomb.free.fr/unlocker/


    Try knoppix or ubuntu - boot the disk and delete what you need to delete.
    Gil Tennant, Nov 15, 2009
    1. Advertisements

  3. sunil

    R. C. White Guest

    Hi, Sunil.

    Even though we don't usually see it, each file/folder with a Long File Name
    (LFN) also has a computer-created Short File Name (SFN), also referred to as
    an 8.3 filename, since it is limited to 8 characters plus and optional
    extension of up to 3 characters. (This goes back in computer history to
    MS-DOS and before.)

    To see the 8.3 filename of your folder, open a Command Prompt and enter:
    Dir /x

    That command should present the usual listing of all the files and folders
    in that directory, as with the plain Dir command. But the /x switch will
    create an additional column, before the LFN, showing the SFN for any file or
    folder whose LFN does not also meet the 8.3 requirements. Perhaps there is
    a space or other "illegal" character in the filename. The SFN for a LFN
    will probably have 6 characters, followed by ~1, or some other digit.

    Use the Del or RD command with that SFN to delete your file or remove your
    folder. Using RD <SFN> /s for the top-level folder should remove that whole
    directory tree.

    (As always in a Command Prompt window, type the name of any command followed
    by /? to see all the switches and parameters available with that command,
    such as: Dir /? )

    R. C. White, CPA
    San Marcos, TX

    Microsoft Windows MVP
    Windows Live Mail 2009 (14.0.8089.0726) in Win7 Ultimate x64
    R. C. White, Nov 16, 2009
  4. sunil

    mybad Guest

    I had this same problem and your solution worked! I opened a comman
    prompt and tried the dir /x command and sure enough there was anothe
    name for the folder
    Thanks muc
    mybad, Jan 24, 2010
  5. sunil

    arlanda Guest

    This stupid problem has been around for too long since I started using
    NT 4.0. The problem exist because of limitation with 32-bit

    The solution isn't obvious but it's quite simple.

    If you tried to rename the file, Windows will prevent you.

    If you tried to copy/move the file into another folder with shorter
    path, Windows will prevent you.

    If you tried to rename the folder where the file is currently, Windows
    will prevent you.

    To get around all these, simply start renaming folder from the very top
    (i.e. rename root folder first before renaming level 1 sub-folder before
    level-2 sub, etc. ) until Windows finally release their deathly grip on
    the file before you will finally be able to do anything with it.

    Rename to shorter name, delete, or move the problem file before renaming
    folders back to what it was before, keeping in mind the 256-character
    limitation (file name + path).

    Hopefully we will not have such issue on a 64-bit platform.
    arlanda, Mar 15, 2010
  6. sunil


    Mar 1, 2012
    Likes Received:
    Do you have error messages?, like :
    • Path too long
    • Error cannot delete file: cannot read from source file or disk
    • Cannot delete file: Access is denied
    • There has been a sharing violation.
    • Cannot delete file or folder The file name you specified is not valid or too long. Specify a different file name.
    • The source or destination file may be in use.
    • The file is in use by another program or user.
    • Error Deleting File or Folder
    • Make sure the disk is not full or write-protected and that the file is not currently in use.
    • Error Copying File or Folder.
    • Cannot remove folder.
    • The filename or extension is too long.
    • Path too deep.
    • Destination Path Too Long.
    • Could not find this item.
    • Filename is not valid.
    • The file could not be accessed.
    • The path you entered, is too long. Enter a shorter path.
    • File Name could not be found. Check the spelling of the filename, and verify that the file location is correct.

    Download LONG PATH Tool 3.6 at longpathtooldotcom
    DuglasKrin, Mar 3, 2012
    1. Advertisements

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 (here). After that, you can post your question and our members will help you out.