Too long filenames to delete..

R

Rod Janson

Hi,

When cleaning up some w2k computers in a classroom Explorer refuses to
delete a few files with *very* long filenames. It complains with 'file not
found'. The same happens when I try to delete these files from the
commandline using wildcards.

How can I delete files with extremely long filenames in win2k?

Thanks for a clue on this issue

rod
 
D

David H. Lipman

From: "Rod Janson" <[email protected]>

| Hi,
|
| When cleaning up some w2k computers in a classroom Explorer refuses to
| delete a few files with *very* long filenames. It complains with 'file not
| found'. The same happens when I try to delete these files from the
| commandline using wildcards.
|
| How can I delete files with extremely long filenames in win2k?
|
| Thanks for a clue on this issue
|
| rod
|

If they are in deep folders, use the SUBST.EXE command to map a drive letter to a sub folder
and try to delete them.

Execute SUBST /? for the syntax.
 
J

Jerold Schulman

Hi,

When cleaning up some w2k computers in a classroom Explorer refuses to
delete a few files with *very* long filenames. It complains with 'file not
found'. The same happens when I try to delete these files from the
commandline using wildcards.

How can I delete files with extremely long filenames in win2k?

Thanks for a clue on this issue

rod
See tip 9651 » How can I delete a folder that returns PATH TOO LONG?
in the 'Tips & Tricks' at http://www.jsifaq.com
 
R

Rod Janson

See tip 9651 » How can I delete a folder that returns PATH TOO LONG?
in the 'Tips & Tricks' at http://www.jsifaq.com

Thanks but it is the filename itself which is too long, not the folders or
the path...

Any clues on how to delete files with too long filenames? Rename using
explorer does not work either :-(

Rod
 
J

Jerold Schulman

Thanks but it is the filename itself which is too long, not the folders or
the path...

Any clues on how to delete files with too long filenames? Rename using
explorer does not work either :-(

Rod
Try copying the good files and sub-folders to a temporary location. Then run DelFolder
Then create the folder and move the temo stuff back.

Have you tried using the CMD.EXE windows and the short file name.

Let's assume the file name is in the C:xyz folder and the long file name is
LongFileName012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789.txt

1. Open a CMD.EXE window
2. pushd c:\xyz
3. dir /x l*.txt
4. del /q LONGFI~1.TXT
5. popd
 

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