Can't delete folder and subfolders

  • Thread starter Thread starter Myrgee
  • Start date Start date
M

Myrgee

I keep getting error messages when I try to delete a folder and all of the
subfolders it contains

"The folder speeches contains items whose name is too long for the recycle
bin. Do you want to permanently delete it?

I click yes to all and then get this error

" Can not delete, the file name you specefied is not valid or too long.
Specify a different filename."

There are no files in these folders. Any help would be appreciated.

Ronnie
 
Myrgee said:
I keep getting error messages when I try to delete a folder and all of the
subfolders it contains

"The folder speeches contains items whose name is too long for the recycle
bin. Do you want to permanently delete it?

I click yes to all and then get this error

" Can not delete, the file name you specefied is not valid or too long.
Specify a different filename."

There are no files in these folders. Any help would be appreciated.


Hi Ronnie

It sounds like the sub-folders have long names and/or are many layers
deep, so that the total path- and filename of a sub-folder is more than
256 characters.

Try renaming the folders with shorter names, so that the deepest-layer
sub-folder has a path + name of less than 256, then you should be able
to delete them.

Hope this helps.
 
Most programs only handle up to 260 characters. However the limit is 32000 but one has to do it in a special way (so programs expecting max 260 don't crash when they get 32000 characters to fit into the 260 character space allocated).

Prepend \\?\ to the filename to let windows know you can handle 32000.
eg
"\\?\c:\some folder\some file.exe"

So type cmd in Start Run

type

del "\\?\c:\folder\filename.ext"
 
Very odd, you will probably find there are hinden files in the folder. You
could try deleting the files from DOS, do this

Start - Run - (type) CMD press enter

In the black DOS window
type cd \enter_dir_name\dirname (enter)
type attrib . (enter)
A list of the files will show
type attrib -r -h -s . (enter)
type del . (enter)

That should delete the files in the folder now either type cd .. (enter) /
rm dirname (enter) or delete the folder from windows (hold the shift key
whilst pressing del and it will delete it rather than recycleing it)

Let us know

Ashleigh
 
Back
Top