Deleting Folders with Names Ending Periods

by Joe Havelick 8. February 2009 19:17

Although it is not possible to create NTFS folders ending in periods through Explorer, there are a few ways in which you may end up with such a folder on your hard drive.  If you do, you will find that folder difficult to read, update, or delete.  Windows will allow you to move it to the recycling bin, but not delete it.  You will be presented with an error indicateing that it "Could not find..." when trying to navigate via Explorer or the command prompt.

This folder is likely valid, so running checkdisk will not resolve the issue.  

Certain command line tools support a special syntax ("\\?\") which allows you to reference these folders.  In this example, I will describe how to delete a folder "C:\Folder\Misc.." which contains files and folders at a lower level.  First, we must remove those files and folders:

 del "\\?\C:\Folder\Misc.." /s

Next, I can remove the folder itself

 rmdir "\\?\C:\Folder\Misc.."


Tags: ,

Tech Tips

Comments (2) -

11/21/2011 10:46:01 PM #


I downloaded a folder named "Martin Luther King Jr." and I can't delete it.
I've tried using the Dos command: rmdir "\\C:\a\Martin Luthur King Jr." /s
The problem folder is in a folder "a" in C: drive.
After answering Y to the "Are you sure?" prompt, it came back with the message: "The network path was not found."

Any remedy?

Norman |

11/22/2011 9:58:28 AM #



del "\\?\C:\a\Martin Luthur King Jr." /s
rmdir "\\?\C:\a\Martin Luthur King Jr."

Joey |

Comments are closed

About Me

Joe Havelick is a reasonable facsimile of this photo.

profile for Joe on Stack Exchange, a network of free, community-driven Q&A sites