Unable to delete file with extremly long name

G

Guest

I was unable to delete file with extremly long name in Temporary Internet
Files folder.

In a command prompt window, I entered:

DEL /F /S /Q "\\?\C:\Documents and Settings\xyz\Local
Settings\Temp\Temporary Internet Files\Content.IE5\*.*"

Error appeared:
The path \\?\C:\Documents and Settings\xyz\Local Settings\Temp\Temporary
Internet
Files\Content.IE\PS7XCPH\article;type=rhighlts;artid=nri1855;date=200605;issue=5;subco=reviewss50,;chaco=;keywd=;njdis=;njreg=;crstg=;pos=top;sz=728x90;fidid=0;posid=0;plaid=0;abr=!webtv;ord=[2] is too long.

The file was unable to be renamed to a shorter length.

Any help will be appreciated.
 
J

John John

Try using the SUBST command to shorten the path then issue the del
command using the substituted drive letter for the long path. When
you're done delete the substituted drive. Do SUBST /? at the command
prrompt for help.

Example:

subst x: "C:\Documents and Settings\xyz\Local
Settings\Temp\Temporary Internet Files\Content.IE5"

DEL /F /S /Q x:\*.*

subst x: /d

John
 
W

Wesley Vogel

\\?\ turns off some checking of illegal names as a side effect of allowing
paths up to 32000 characters.

Open a command prompt and type:

del \\?\

Drag the file into the command prompt so you do not have to type the name
and path.
Click on the command prompt Title bar to give it focus.
Then hit enter.

Why not just clean out the Temporary Internet Files folder?

To delete *all* of your Temporary Internet Files...

1) Start | Run | Type: inetcpl.cpl | Click OK
Or right click the Internet Explorer icon on your Desktop
Or Start | Settings | Control Panel | Internet Options
Best to do this with all instances of Internet Explorer closed. Especially
if there are a large number of files. Also close OE.
2) On the General Tab, in the middle of the screen, click on Delete Files
3) Check the box: Delete all offline content {This cleans >>
%userprofile%\Local Settings\Temporary Internet Files
AND
%userprofile%\Local Settings\Temporary Internet Files\Content.IE5
and \Content.MSO (Created by an MS Office program)}
4) Click on OK and wait for the hourglass icon to stop after it deletes the
temporary internet files
5) You can now click on Delete Cookies and click OK to delete cookies that
websites have placed on your hard drive.
6) You can also click on the Clear History button to empty your History
folder.

Note: If you do NOT select the Delete all offline content box, not
everything will be cleaned out.

Content.IE5 is a hidden system folder.

IE 7 does not have a Delete all offline content option.

You cannot delete a file or a folder on an NTFS file system volume
http://support.microsoft.com/kb/320081

--
Hope this helps. Let us know.

Wes
MS-MVP Windows Shell/User

In
 
J

John John

Thanks for the tip, Wesley. Now I have to create a path of 32001
characters to test this...

John
 
W

Wesley Vogel

<quote>
In the Windows API, the maximum length for a path is MAX_PATH, which is
defined as 260 characters. A path is structured in the following order:
drive letter, colon, backslash, components separated by backslashes, and a
null-terminating character, for example, the maximum path on the D drive is
D:\<256 chars>NUL.

The Unicode versions of several functions permit a maximum path length of
approximately 32,000 characters composed of components up to 255 characters
in length. To specify that kind of path, use the "\\?\" prefix.

Note The maximum path of 32,000 characters is approximate, because the
"\\?\" prefix can be expanded to a longer string, and the expansion applies
to the total length.
<quote>
More, see..
Maximum Path Length
here...
Naming a File
http://msdn2.microsoft.com/en-us/library/aa365247.aspx

--
Hope this helps. Let us know.

Wes
MS-MVP Windows Shell/User

In
 
G

Guest

It is a left-over account which is no longer in use in our network. I
deleted most files of his profile from computer but was unable to delete
those long name files. I have tried a lot of methods, including changing
file name, mapping the folder, using Windows API and “DEL \\?\†command, et
al. but not worked.

To let IE 7 clean them, I moved my “Temporary Internet Files†folder to that
account then click “Delete…â€. It didn’t work as IE didn’t recognize those
old folders. Then I moved “Temporary Internet Files†folder back and tried
again. It worked! IE removed those long name files as well as their folders!

Thanks for your help!

--
Tiger


Wesley Vogel said:
\\?\ turns off some checking of illegal names as a side effect of allowing
paths up to 32000 characters.

Open a command prompt and type:

del \\?\

Drag the file into the command prompt so you do not have to type the name
and path.
Click on the command prompt Title bar to give it focus.
Then hit enter.

Why not just clean out the Temporary Internet Files folder?

To delete *all* of your Temporary Internet Files...

1) Start | Run | Type: inetcpl.cpl | Click OK
Or right click the Internet Explorer icon on your Desktop
Or Start | Settings | Control Panel | Internet Options
Best to do this with all instances of Internet Explorer closed. Especially
if there are a large number of files. Also close OE.
2) On the General Tab, in the middle of the screen, click on Delete Files
3) Check the box: Delete all offline content {This cleans >>
%userprofile%\Local Settings\Temporary Internet Files
AND
%userprofile%\Local Settings\Temporary Internet Files\Content.IE5
and \Content.MSO (Created by an MS Office program)}
4) Click on OK and wait for the hourglass icon to stop after it deletes the
temporary internet files
5) You can now click on Delete Cookies and click OK to delete cookies that
websites have placed on your hard drive.
6) You can also click on the Clear History button to empty your History
folder.

Note: If you do NOT select the Delete all offline content box, not
everything will be cleaned out.

Content.IE5 is a hidden system folder.

IE 7 does not have a Delete all offline content option.

You cannot delete a file or a folder on an NTFS file system volume
http://support.microsoft.com/kb/320081

--
Hope this helps. Let us know.

Wes
MS-MVP Windows Shell/User

In
Tiger said:
I was unable to delete file with extremly long name in Temporary Internet
Files folder.

In a command prompt window, I entered:

DEL /F /S /Q "\\?\C:\Documents and Settings\xyz\Local
Settings\Temp\Temporary Internet Files\Content.IE5\*.*"

Error appeared:
The path \\?\C:\Documents and Settings\xyz\Local Settings\Temp\Temporary
Internet
Files\Content.IE\PS7XCPH\article;type=rhighlts;artid=nri1855;date=200605;iss
ue=5;subco=reviewss50,;chaco=;keywd=;njdis=;njreg=;crstg=;pos=top;sz=728x90;
fidid=0;posid=0;plaid=0;abr=!webtv;ord=[2]
is too long.

The file was unable to be renamed to a shorter length.

Any help will be appreciated.
 
F

FG

Open a DOS windows. Go to the appropriate directory.
type del /x
use the short filename to delete.

SUGGESTION :

(Get DOS Here, which is included in the Windows Power tools.
Somewhere on MS site).

The you can cright click and select DOS here and a DOS window
will open.

---

If you are still unable to delete the file, reboot with GHOST 10 (there are
probably other software to achieve that). Choose Analyse/explore your
computer, etc, you should then be able to delete whatever file you wish.

----

Tiger said:
It is a left-over account which is no longer in use in our network. I
deleted most files of his profile from computer but was unable to delete
those long name files. I have tried a lot of methods, including changing
file name, mapping the folder, using Windows API and "DEL \\?\" command,
et
al. but not worked.

To let IE 7 clean them, I moved my "Temporary Internet Files" folder to
that
account then click "Delete.". It didn't work as IE didn't recognize those
old folders. Then I moved "Temporary Internet Files" folder back and
tried
again. It worked! IE removed those long name files as well as their
folders!

Thanks for your help!

--
Tiger


Wesley Vogel said:
\\?\ turns off some checking of illegal names as a side effect of
allowing
paths up to 32000 characters.

Open a command prompt and type:

del \\?\

Drag the file into the command prompt so you do not have to type the name
and path.
Click on the command prompt Title bar to give it focus.
Then hit enter.

Why not just clean out the Temporary Internet Files folder?

To delete *all* of your Temporary Internet Files...

1) Start | Run | Type: inetcpl.cpl | Click OK
Or right click the Internet Explorer icon on your Desktop
Or Start | Settings | Control Panel | Internet Options
Best to do this with all instances of Internet Explorer closed.
Especially
if there are a large number of files. Also close OE.
2) On the General Tab, in the middle of the screen, click on Delete Files
3) Check the box: Delete all offline content {This cleans >>
%userprofile%\Local Settings\Temporary Internet Files
AND
%userprofile%\Local Settings\Temporary Internet Files\Content.IE5
and \Content.MSO (Created by an MS Office program)}
4) Click on OK and wait for the hourglass icon to stop after it deletes
the
temporary internet files
5) You can now click on Delete Cookies and click OK to delete cookies
that
websites have placed on your hard drive.
6) You can also click on the Clear History button to empty your History
folder.

Note: If you do NOT select the Delete all offline content box, not
everything will be cleaned out.

Content.IE5 is a hidden system folder.

IE 7 does not have a Delete all offline content option.

You cannot delete a file or a folder on an NTFS file system volume
http://support.microsoft.com/kb/320081

--
Hope this helps. Let us know.

Wes
MS-MVP Windows Shell/User

In
Tiger said:
I was unable to delete file with extremly long name in Temporary
Internet
Files folder.

In a command prompt window, I entered:

DEL /F /S /Q "\\?\C:\Documents and Settings\xyz\Local
Settings\Temp\Temporary Internet Files\Content.IE5\*.*"

Error appeared:
The path \\?\C:\Documents and Settings\xyz\Local
Settings\Temp\Temporary
Internet
Files\Content.IE\PS7XCPH\article;type=rhighlts;artid=nri1855;date=200605;iss
ue=5;subco=reviewss50,;chaco=;keywd=;njdis=;njreg=;crstg=;pos=top;sz=728x90;
fidid=0;posid=0;plaid=0;abr=!webtv;ord=[2]
is too long.

The file was unable to be renamed to a shorter length.

Any help will be appreciated.
 
W

Wesley Vogel

Did you happen to mean: Open Command Window Here?

XP does not have MS-DOS.

--
Hope this helps. Let us know.

Wes
MS-MVP Windows Shell/User

In
FG said:
Open a DOS windows. Go to the appropriate directory.
type del /x
use the short filename to delete.

SUGGESTION :

(Get DOS Here, which is included in the Windows Power tools.
Somewhere on MS site).

The you can cright click and select DOS here and a DOS window
will open.

---

If you are still unable to delete the file, reboot with GHOST 10 (there
are probably other software to achieve that). Choose Analyse/explore your
computer, etc, you should then be able to delete whatever file you wish.

----

Tiger said:
It is a left-over account which is no longer in use in our network. I
deleted most files of his profile from computer but was unable to delete
those long name files. I have tried a lot of methods, including changing
file name, mapping the folder, using Windows API and "DEL \\?\" command,
et
al. but not worked.

To let IE 7 clean them, I moved my "Temporary Internet Files" folder to
that
account then click "Delete.". It didn't work as IE didn't recognize
those old folders. Then I moved "Temporary Internet Files" folder back
and tried
again. It worked! IE removed those long name files as well as their
folders!

Thanks for your help!

--
Tiger


Wesley Vogel said:
\\?\ turns off some checking of illegal names as a side effect of
allowing
paths up to 32000 characters.

Open a command prompt and type:

del \\?\

Drag the file into the command prompt so you do not have to type the
name and path.
Click on the command prompt Title bar to give it focus.
Then hit enter.

Why not just clean out the Temporary Internet Files folder?

To delete *all* of your Temporary Internet Files...

1) Start | Run | Type: inetcpl.cpl | Click OK
Or right click the Internet Explorer icon on your Desktop
Or Start | Settings | Control Panel | Internet Options
Best to do this with all instances of Internet Explorer closed.
Especially
if there are a large number of files. Also close OE.
2) On the General Tab, in the middle of the screen, click on Delete
Files 3) Check the box: Delete all offline content {This cleans >>
%userprofile%\Local Settings\Temporary Internet Files
AND
%userprofile%\Local Settings\Temporary Internet Files\Content.IE5
and \Content.MSO (Created by an MS Office program)}
4) Click on OK and wait for the hourglass icon to stop after it deletes
the
temporary internet files
5) You can now click on Delete Cookies and click OK to delete cookies
that
websites have placed on your hard drive.
6) You can also click on the Clear History button to empty your History
folder.

Note: If you do NOT select the Delete all offline content box, not
everything will be cleaned out.

Content.IE5 is a hidden system folder.

IE 7 does not have a Delete all offline content option.

You cannot delete a file or a folder on an NTFS file system volume
http://support.microsoft.com/kb/320081

--
Hope this helps. Let us know.

Wes
MS-MVP Windows Shell/User

In Tiger <[email protected]> hunted and pecked:
I was unable to delete file with extremly long name in Temporary
Internet
Files folder.

In a command prompt window, I entered:

DEL /F /S /Q "\\?\C:\Documents and Settings\xyz\Local
Settings\Temp\Temporary Internet Files\Content.IE5\*.*"

Error appeared:
The path \\?\C:\Documents and Settings\xyz\Local
Settings\Temp\Temporary
Internet

Files\Content.IE\PS7XCPH\article;type=rhighlts;artid=nri1855;date=200605;iss
ue=5;subco=reviewss50,;chaco=;keywd=;njdis=;njreg=;crstg=;pos=top;sz=728x90;
fidid=0;posid=0;plaid=0;abr=!webtv;ord=[2]
is too long.

The file was unable to be renamed to a shorter length.

Any help will be appreciated.
 
Top