Deleting files with empty extensions on Windows 8.1
I'm posting this here so I can find it more easily because this is at least the third time I had to google the issue to retrace my own steps on StackOverflow to find the solution I found last time! I even found some useful comments I wanted to upvote, only to realize they were my own from months ago! Argh!
So here's the situation:
You somehow managed to create a file with an empty extension. One cannot normally do this, but one can do it thru e.g. the browser if one types a dot at the end of the filename. This creates two files, one without an extension and one with an empty extension:
If one tries to delete them the normal way, one gets "file not found" error for the one with a dot at the end:
And even using del thru an elevated cmd does not work.
Being sneaky with del *. does not work either.
One has to use a special syntax that can deal with ill-formatted file names: