Removing Files with a Name That's Too Long

E

emanon

I'm removing problems from someone's computer and I have a file that won't
allow itself to be renamed or deleted. I'll spare the details of what they
are called, but it's a GIF from a porn site. The name of the file describes
everything the site offers. The file name can be displayed from Windows
Explorer or a command line, but the RENAME is not selectable from Windows
Explorer and it will not rename from a command line either. I've also tried
renaming the file with a popular third party graphics viewer that offers
this function, but that's not effective either.

These files are in a folder for temporary Internet files and I can't delete
the folder because it is not empty. I can't delete the graphics in the
folder because the name is too long. Help!
 
S

Stan Brown

I'm removing problems from someone's computer and I have a file that won't
allow itself to be renamed or deleted. I'll spare the details of what they
are called, but it's a GIF from a porn site. The name of the file describes
everything the site offers. The file name can be displayed from Windows
Explorer or a command line, but the RENAME is not selectable from Windows
Explorer and it will not rename from a command line either. I've also tried
renaming the file with a popular third party graphics viewer that offers
this function, but that's not effective either.

These files are in a folder for temporary Internet files and I can't delete
the folder because it is not empty. I can't delete the graphics in the
folder because the name is too long. Help!

Can you open a command prompt, do
dir /x
and delete the file under its 8.3 name?
 
D

David Candy

\\?\c:\somefile

can handle file names to 32000 characters (and is the current way of doing it)

c:\somefile is 260 characters and is for older programs.
 
C

Christopher Davis [MSFT]

Open a cmd window and type the below command:
subst x: c:\path\to\folder\containing\gif\

(if x: already exists on your system use any other drive letter that is not
currently in use)
x:
del thereallylonggiffilename.gif
subst x: /D

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

"David Candy" <.> wrote in message
\\?\c:\somefile

can handle file names to 32000 characters (and is the current way of doing
it)

c:\somefile is 260 characters and is for older programs.
 
B

Bill Sharpe

How about from a cmd prompt in the offending directory
del *.gif

The * is a wild-card character covering any characters up to the dot.

Bill

message Open a cmd window and type the below command:
subst x: c:\path\to\folder\containing\gif\

(if x: already exists on your system use any other drive letter that is
not
currently in use)
x:
del thereallylonggiffilename.gif
subst x: /D

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

"David Candy" <.> wrote in message
\\?\c:\somefile

can handle file names to 32000 characters (and is the current way of
doing
it)

c:\somefile is 260 characters and is for older programs.
 

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

Ask a Question

Top