Discussion Locked

File can't be deleted - too long

0 helpful
9 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
I have a couple files and folders that were downloaded from the Internet with names that are extremely long. I can't delete or rename them or open up the properties. Doesn't work with the cmd prompt either. Any ideas on how I can delete them?

9 replies

by ahching

Hi,

Did you try to rename the parent folder to a shorter name?
e.g.
\subfolder1\subfolder2\veryloooooooooooooongfilename
to
\1\2\veryloooooooooooooongfilename

Then delete the folder "2" (don't forget to backup those files that you want)

by robcoxon

Thanks. I also had to take ownership and reapply permissions again after the rename.

by otl

Try dragging (moving) it to the root directory, then delete.

In the command prompt;

1. Go to the directory.
2. List all files with the first 3 to 6 characters (filen*.*), to ensure only the one you want to delete is on the list.
3. Type in ren filen*.* temp.txt
4. Type in del temp.txt
5. File should be gone, if not;
a. Type in attrib -h -s -r temp.txt
b. Repeat step 4.

by shmaltz

Been there done that. The only way I was able to delete it:
1. Share the parents parent Directory (lets say as tempshere)
2. On any computer that is network with this machine, map or browse to the tempshare and just delete the parent folder that holds the long folder or filename (actualy I don't remember if this is neccessary or you can just delete the file/folder itself), but the point is that over the network it works.
Hoep this helps, email me if you need more help.

This discussion is closed to new replies.