How to Delete a File Ending in a Dot in Windows 7

windowswindows 7

After installing Cygwin on Windows 7 and realizing I'm better of with using Linux on a different partition, I wanted to uninstall it. However, Cygwin has no uninstaller so I was left with the option of deleting the whole folder it was installed in – which I did.

The problem is that a single file remained, in the whole directory tree, named README. at C:\cygwin\usr\share\texmf-dist\doc\latex\hausarbeit-jura\README.

I know Windows isn't supposed to allow files with names ending in ., but this one obviously got through, and I cannot delete it. When trying to do that, I get

Item Not Found

This is no longer located in C:\cygwin\usr\share\texmf-dist\doc\latex\hausarbeit-jura. Verify the item's location and try again.

When viewing the properties of the file (Right-click, Properties), Windows tells me that it has 0 bytes. However, when viewing it in the explorer window, and clicking on it, the windows status bar thing tells me it has 517 bytes.

Any ideas on how to get rid of it?

Best Answer

Having tried all of these suggestions and more, I still couldn't delete the offending files.

What finally did it was to use the following syntax (in an elevated command prompt):

del "\\?\<full path to file>"

eg, to use the original example:

del "\\?\C:\cygwin\usr\share\texmf-dist\doc\latex\hausarbeit-jura."
Related Question