Alf said:
I have picked up a few files with very long names that Windows 7 will not delete (error message indicating that file names are too long). So far I have tried (1) rebooting, (2) moving or changing the
files names--will not work because I get a Windows error sound by just clicking on the files, and (3) using CMD to try to delete the files with old DOS commands--still get an error message re length
of the files.
I would appreciate any suggestions. TIA. --Alf
The best way to fix it, is to rename the file first, so that
it uses a shorter name. Then it can be deleted.
I tested that using the PERL programming language (ActiveState
PERL is a free download). I was able to create a 259 character
pathname, which explorer wouldn't delete (threw the kind of error
you're seeing). By running my script a second time, I was able
to use the PERL "rename" command, to change the name to something
shorter. In my testing, it seemed there was one particular
length that other programs can produce, that Explorer cannot
delete. I'd say that is a pretty long standing bug, in terms
of a lack of performance on Microsoft's part. The OS should
be able to do at least as well, as any other utility can do.
What it boils down to, is selecting a tool that doesn't use
the standard way of doing things. And thereby avoiding the
bug/shortcoming.
An example someone suggested in the past was "MP3rename", but
when you look at some utilities like that, their function and
interface are pretty far removed from your request for
a simple tool to delete that file. Using PERL is
equally far fetched - I used that environment, just to do
some quick testing, and it wasn't an attempt to write my
own tool or anything. Just to see "what happens at 259".
Paul