Windows 7 - Unable to delete folder with too long name

Asked By sunil
15-Nov-09 05:54 AM
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
Windows 7
(1)
X64
(1)
UsingNT
(1)
Pleasew
(1)
Marcos
(1)
Directory
(1)
Unlocker
(1)
Knoppix
(1)
  Gil Tennant replied to sunil
15-Nov-09 10:12 AM
It could be created by Malware, which still has it open..

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

Or...

Try knoppix or ubuntu - boot the disk and delete what you need to delete.


--
Gil Tennant
  R. C. White replied to sunil
15-Nov-09 10:45 PM
Hi, Sunil.

Even though we do not 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@grandecom.net
Microsoft Windows MVP
Windows Live Mail 2009 (14.0.8089.0726) in Win7 Ultimate x64
  mybad replied to R. C. White
24-Jan-10 12:08 PM
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


--
mybad
  arlanda replied to R. C. White
15-Mar-10 06:51 PM
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 is not obvious but it is 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
Create New Account
help
Windows 7 Windows 7 I am new to Windows 7. Is there a group specific to Windows 7? Ray Windows 64 bit Discussions Windows 7 (1) Bit (1) Microsoft Windows (1) X64 (1
driver for windows 7 Windows 7 Hello! I???ve developed simple driver for windows XP, created .inf file and it work OK. Now I want to start it on windows 7 x64. I compile my driver using Build Environments / Windows 7 / ??? from WDK 7600.16385.0 and
need d / l link for Windows 7 Windows 7 anyone??? Windows 64 bit Discussions Windows 7 (1) Office (1) Vista (1) XP (1) X64 (1) ViewArticleBasic (1) VelociRaptor (1) GeForce (1) As John posted before, go to http: / / www
windows 7 Windows 7 I cannot find a windows 7 group. Im hoping that this group will work. I have a netbook with windows 7. However windows 7 has this silly feature where if you drag a window off the
Windows 7 fails configuring updates Windows 7 Windows 7 fails configuring updates OS: Windows 7 Ultimate 64 bit Antivirus: Avira AntiVir Personal Windows Update Discussions UNEXPECTEDAn (1) Windows Update (1