Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Cannot delete files with long names

915 views
Skip to first unread message

Perry Diels

unread,
Jan 6, 2004, 7:21:59 PM1/6/04
to
Hello,

I ran into a problem on a Windows XP (Home) machine. In the temporary
Internet Files folder are some files with extremely long names. When trying
to delete them there's an error message "Cannot delete xxxx.xxx, cannot find
the specified file" I ran chkdsk /f and chkdsk /r but it didn't help. The
file system is NTFS. is there any method to solve this problem? All help
appreciated,

best regards,
Perry


Harshit Agarwal [MSFT]

unread,
Jan 7, 2004, 1:08:04 AM1/7/04
to
How exactly are you trying to delete the file? For instance, using the
command prompt or explorer? If via the command prompt, are you properly
quoting the file name, that is if it contains spaces?

--
Harshit Agarwal [MSFT]
This posting is provided "AS IS" with no warranties, and confers no rights.

"Perry Diels" <perry...@optivoks.com> wrote in message
news:%234LaGRL...@TK2MSFTNGP10.phx.gbl...

Drew Cooper [MSFT]

unread,
Jan 7, 2004, 4:16:57 PM1/7/04
to
There are problems with names that are too long for the Win32 APIs. One
solution is to get the paths at cmdline with "dir /x" (8.3 format, so the
names are probably shorter). Another solution, using Explorer, is to start
renaming the directories to shorter names, walking slowly down the directory
tree, until the entire thing can be deleted.

Hope that helps.
--
Drew Cooper [MSFT]


This posting is provided "AS IS" with no warranties, and confers no rights.


"Harshit Agarwal [MSFT]" <hars...@online.microsoft.com> wrote in message
news:uRqjsSO1...@TK2MSFTNGP09.phx.gbl...

Malte Starostik

unread,
Jan 12, 2004, 2:13:40 PM1/12/04
to
Another less intrusive solution than renaming dirs is to use the subst
command to map the directory containing such a file to a drive letter.
Of course this only works if the file name itself is small enough for WinAPI
and only gets too long when the absolute path is prepended.

HTH,
-Malte

"Drew Cooper [MSFT]" <dc...@online.microsoft.com> schrieb im Newsbeitrag
news:ewCnmOW1...@tk2msftngp13.phx.gbl...


> There are problems with names that are too long for the Win32 APIs. One
> solution is to get the paths at cmdline with "dir /x" (8.3 format, so the
> names are probably shorter). Another solution, using Explorer, is to
start
> renaming the directories to shorter names, walking slowly down the
directory
> tree, until the entire thing can be deleted.
>
> Hope that helps.

R. C. White

unread,
Jan 15, 2004, 5:12:47 PM1/15/04
to
Hi, Perry.

Here are three or four ways to do it:

1. In IE, click Tools | Internet Options... In the middle of the first
(General) tab, under Temporary Internet Files, click Delete Files...

2. On the same tab, click Settings... On the next screen, click View
Files... or View Objects... and then selectively delete the ones you choose.

3. On the Advanced tab of Internet Options..., scroll all the way to the
Security settings and check Empty Temporary Internet Files folder when
browser is closed. Then exit IE.

The fourth way usually works with "normal" files, but those in the TIF are
not normal. They have their own special rules, so this might not work - but
it's worth a try.

4. Open a "DOS" window. Use the Dir command with the /x switch to see the
SFN (Short File Name, also known as the 8.3 filename) in a column before the
LFNs. Then use Del with the SFN to delete the files, or RD with the SFN to
remove a folder. If you can navigate to the parent folder of a folder tree
that holds nothing you want to keep (such as the hidden folder Temporary
Internet Files, parent of the hidden folder Content.IE5, which holds all the
hidden TIF subfolders), then you probably can remove the whole tree in one
fell swoop by typing: rd <SFN> /s (or rd content.ie5 /s). The rd command
with /s removes the entire folder, subfolders, files and all.

In the "DOS" window, you can type any command name followed by /? to see a
mini-help file listing all the switches available with that command, such as
Dir /?.

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

"Perry Diels" <perry...@optivoks.com> wrote in message
news:%234LaGRL...@TK2MSFTNGP10.phx.gbl...

0 new messages