Saving a file with a trailing period is undeletable


#1

Yesterday I saved a file with a trailing period to the desktop. I meant to type sample.md but hit enter after the period. Atom created ‘sample.’ on the desktop, which apparently is not valid in Windows (Windows 7). Now when I try and delete it through Windows Explorer or the shell, it simply says it cannot find the file.

Thought I’d let you all know, maybe some validation could be put in place. Also, if anyone might know a trick to delete the file, I’d really appreciate it. Great editor! Great work everyone!

Joshua Belden


#2

I might have a trick to delete the file. Apparently, you can use something like this:

del \\?\c:\path\to\file\sample.

See this SuperUser post for more details:


#3

Well, unfortunately, that didn’t work for me. However, I just tried a rename in Atom with an F2, and it was able to successfully rename the file to one with an extension. If you try and just delete it in the editor, it’ll confirm a move to the trash but the delete doesn’t actually happen. A rename will however.

So I guess Atom is a cheap fix for other people that have gotten theirselves in this state for one reason or another. :slight_smile:


#4

FWIW: I installed a package that gives me most of the bash shell right in cmd windows. It supports any file name.


#5

What was the name of the package? I’ll take a look.


#6

I don’t remember but I looked in my path and saw gow which is at https://github.com/bmatzelle/gow/wiki. However the feature set doesn’t seem to match what I’m using. Maybe I have an old version.

Two others I found were http://mridgers.github.io/clink/ and http://win-bash.sourceforge.net/. The most common method is mingw but that doesn’t work in a standard command window and I find it bloated.


#7

It is definitely gow. I highly recommend it.