Windows Vista Forums

Re: Unable to delete folder with too long name

  1. #1


    R. C. White Guest

    Re: Unable to delete folder with too long name

    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 /? )

    RC
    --
    R. C. White, CPA
    San Marcos, TX
    rc@newsgroup
    Microsoft Windows MVP
    Windows Live Mail 2009 (14.0.8089.0726) in Win7 Ultimate x64

    "sunil" <callmesunil@newsgroup> wrote in message
    news:OqAK9HeZKHA.196@newsgroup

    > 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.
    >
    > Regards,
    > Sunil

      My System SpecsSystem Spec

  2. #2



    Newbie
    Join Date : Mar 2009
    Posts : 1
    Vista Home Premium x64
    Local Time: 05:24 AM


     

    Re: Unable to delete folder with too long name

    I had this same problem and your solution worked! I opened a command prompt and tried the dir /x command and sure enough there was another name for the folder.
    Thanks much

      My System SpecsSystem Spec

  3. #3



    Member
    Join Date : Apr 2009
    Posts : 10
    Vista 32
    Local Time: 03:24 AM


     

    Re: Unable to delete folder with too long name

    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 architecture.

    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.

      My System SpecsSystem Spec

Re: Unable to delete folder with too long name

Similar Threads
Thread Thread Starter Forum Replies Last Post
Unable to delete/rename/move folder armada213 Vista General 4 10 Aug 2009
Unable to delete folder (0x800710FE JP B Vista file management 12 08 Apr 2008
Unable to delete emails from sent folder. gatitan1 Vista mail 3 29 Oct 2007
Vista IE7 delete the Favorites Folder take a long time wkeungy Vista General 0 07 Aug 2007
Unable to delete folder DevinG. Vista General 0 08 Jul 2007