Delete a folder



Richard Miller
07-09-2005, 10:11 PM
I can't delete a folder with subfolders. How can I delete them when the
message says: "The file name you specified is not valid or too long. Specify
a different file name."? I renamed it and it did not work. I tried to delete
the sub folders and that didn't work. What can I do to get rid of this
folder?

Richard

Wesley Vogel
07-09-2005, 10:11 PM
Path Too Long

To work around this problem, reduce the length of the path to less than 256
characters.

In Windows Explorer, select the folder one level above the folder that
returns the error. Right-click the folder returning the error and then click
Rename. Rename the folder to reduce the number of characters used in the
folder name.

Rename the folder so that the target files that are deeper than the MAX_PATH
no longer exist. If you do this, start at the root folder (or any other
convenient place), and then rename folders so that they have shorter names.

Rename subfolders in the path to a file so that the total path or file name
is less than the max_path setting or 256 characters. Start with subfolders
that are closer to the root so that you are always working with less than
256 characters.


You cannot delete a file or a folder on an NTFS file system volume
http://support.microsoft.com/default.aspx?scid=kb;en-us;320081

--
Hope this helps. Let us know.

Wes
MS-MVP Windows Shell/User

In news:nD3ke.4292$wq.166@fed1read06,
Richard Miller <miller57@cox.net> hunted and pecked:
> I can't delete a folder with subfolders. How can I delete them when the
> message says: "The file name you specified is not valid or too long.
> Specify a different file name."? I renamed it and it did not work. I
> tried to delete the sub folders and that didn't work. What can I do to
> get rid of this folder?
>
> Richard

Rick \Nutcase\ Rogers
07-09-2005, 10:11 PM
Hi Richard Miller,

> I can't delete a folder with subfolders. How can I delete them when the
> message says: "The file name you specified is not valid or too long.
> Specify a different file name."? I renamed it and it did not work. I tried
> to delete the sub folders and that didn't work. What can I do to get rid
> of this folder?
>
> Richard

Try this: Open a command prompt and navigate to the parent folder holding
the target folder to be deleted. From the prompt, run:

RD /s /q <target_folder>

--
Best of Luck,

Rick Rogers, aka "Nutcase" - Microsoft MVP
http://mvp.support.microsoft.com/
Associate Expert - WindowsXP Expert Zone
www.microsoft.com/windowsxp/expertzone
Windows help - www.rickrogers.org


Delete a folder