Folder cannot be deleted

Get a Linux Live Cd, and either get gparted, systemrescue or parted magic (anyone would work, but a small distro for something quick). Burn it cd/usb, and boot your computer to it. Mount the hd, and find the folder and delete it.

You can use Unetbootin or do it manually.


Microsoft wrote an article listing many different things that can prevent deletion and fixes for each:

  • Q320081: You cannot delete a file or a folder on an NTFS file system volume

With a directory named cygwin, the problem is probably "Cause 5: The file name includes a reserved name in the Win32 name space" because cygwin contains a dev subdirectory containing files which may overlap with Win32 reserved device names. The solution is to use the \\?\ prefix to name these files.