Hi, Alf.
As suggested by GlowingBlueMist and Andrew Rossman, you can use the Command
Prompt and those old DOS commands to delete those files.
First, navigate (CD for Change Directory) to the directory where those files
reside. If your foldernames are too long for CD to do it in one fell swoop,
you can CD one level at a time to get there.
Then remember the /x switch with the Dir command. This lists the SFN (Short
File Name) for any file whose LFN (Long File Name) does not comply with the
ancient 8.3 filename rules. (For those reading along, even a
single-character filename can be an LFN if that single character is one that
does not comply with the 8.3 rules.) The SFN will be in a column before the
LFN, but only for LFNs that don't also qualify as SFNs.
If your folder has too many files to comfortably use dir /x for the whole
list, then use a wildcard to shorten the list; it should still work. This
command produces the SFN for both Program Files (PROGRA~1) and Program Files
(x86) (PROGRA~2) in my Windows folder:
Dir pro* /x
Then just use the Del command with the SFN: del PROGRA~1
If you need to get rid of a folder, rather than a file, remember to use rd
(Remove Directory) rather than Del.
As usual in a Command Prompt window, just type any command followed by /? to
see a mini-Help file listing the switches and parameters available with that
command.
RC
--
R. C. White, CPA
San Marcos, TX
[email protected]
Microsoft Windows MVP (2002-9/30/10)
Windows Live Mail Version 2011 (Build 15.4.3508.1109) in Win7 Ultimate x64
SP1 RC
"Alf" wrote in message
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