If you dig deeper, you'll find working solutions in comments, but they're incomplete and its not obvious at first that it even works.
The Problem
The problem is simple: You wish to create a unix-style hidden file, such as "
.htaccess
" , ".gitignore
", or ".netrc
", or a unix-style hidden folder, for whatever reason.While this is not a problem for literally any tool other than Windows Explorer, attempting to do this in Explorer yields the following error:
You must type a file name.
The Solution
Most proponents suggest strange solutions such as usingcmd.exe
or notepad
to do your dirty work, and even Microsoft Developers seem to think that letting Explorer do this is crazy and suggest using some other tool However, all that is unnecessary.
All that is required is writing an additional dot ( period ) at the tailing end.
If you wanted '
.htaccess
', instead, write '.htaccess.
'If you wanted '
.gitignore
' , instead, write '.gitignore.
'Explorer will silently strip the last dot and give you the file name you wanted, with no fuss.
That's a nice trick.
ReplyDelete