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:
![pesky file 0 pesky file 0](https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fc592e4c4-520e-471b-98b8-8618929aa7f8_304x61.png)
![pesky file 1 pesky file 1](https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fab16d5b2-0318-404b-ad7a-06357ac2c5e0_602x60.png)
If one tries to delete them the normal way, one gets "file not found" error for the one with a dot at the end:
![pesky file 2 pesky file 2](https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ff2ba7597-ae64-455d-b30d-e3ceeba0d31d_603x237.png)
And even using del thru an elevated cmd does not work.
![pesky file 3 pesky file 3](https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F5bd413b2-7490-4549-a93b-da8044bba7c2_374x32.png)
Being sneaky with del *. does not work either.
![pesky file 4 pesky file 4](https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F7c62b234-45cd-4d4c-ab22-a28f2e796794_348x46.png)
One has to use a special syntax that can deal with ill-formatted file names:
![pesky file 5 pesky file 5](https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F4d5a82bf-12eb-4957-a847-884afafd75bd_374x42.png)
AND DEAD!