Tech Support > Microsoft Windows > Can't delete folder and subfolders
Can't delete folder and subfolders
Posted by Myrgee on October 13th, 2005


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

Posted by Nightowl on October 14th, 2005


Myrgee <chupa.cabra@verizon.net> wrote on Thu, 13 Oct 2005:

>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.

--
Nightowl

Posted by David Candy on October 14th, 2005


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"
--
--------------------------------------------------------------------------------------------------
http://webdiary.smh.com.au/archives/...nt/001075.html
=================================================
"Myrgee" <chupa.cabra@verizon.net(ReMoVe)> wrote in message news:%23J2F77B0FHA.3712@TK2MSFTNGP10.phx.gbl...
>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

Posted by Ashleigh on October 14th, 2005


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

"Myrgee" wrote:

> 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
>

Posted by Myrgee on October 14th, 2005


Thank you Night Owl that worked

Posted by Nightowl on October 15th, 2005


Myrgee <chupa.cabra@verizon.net> wrote on Fri, 14 Oct 2005:

>Thank you Night Owl that worked


Great! Glad you have it fixed now.

--
Nightowl


Similar Posts