Skip to content

Instantly share code, notes, and snippets.

@ozh
Created November 22, 2012 13:44
Show Gist options
  • Star 62 You must be signed in to star a gist
  • Fork 7 You must be signed in to fork a gist
  • Save ozh/4131243 to your computer and use it in GitHub Desktop.
Save ozh/4131243 to your computer and use it in GitHub Desktop.
Create dot files/directories (ie .file) on Windows

#How to create a .file or .folder on Windows

There are several ways

1. Rename

  • Create file.txt
  • Rename to .file., the last dot will be dropped, you'll have .file

Works the same with a file or a directory.

2. Command line

File : echo > .name
Directory : mkdir .foldername

3. With Notepad

  • Create a new text document and edit with Notepad
  • When saving, enter .file as a name and select All files (*.*) as file type
@malah-code
Copy link

Thank you, good tricks

@sayantansinha
Copy link

just awesome, saved the day for me!!

@ur0n2
Copy link

ur0n2 commented Mar 21, 2017

awesome!!

@zur4ik
Copy link

zur4ik commented Apr 11, 2017

The trick with dot at the end made me happy! Thanks!

@garbinmarcelo
Copy link

@RahulSDeshpande
Copy link

Good one, thanks :)

@Subfire
Copy link

Subfire commented Dec 5, 2017

how to create a file that file name end with one dot? and two dot?

@chanchal19
Copy link

it shows
you must type a correct folder name

@NGhebreial
Copy link

Thanks a lot!
Windows causes me headache...

@Freelix
Copy link

Freelix commented Apr 19, 2018

Thank you, really helpful !

@Dlaiven
Copy link

Dlaiven commented May 25, 2018

Thank you!

@akaban01
Copy link

cmd worked for me, thank you!

@whereisaaron
Copy link

Thanks! Love number (1): Microsoft developer makes dumb decision (making Windows Explorer validation broken for dot files that NTFS actually supports), compounds with dumb bug that defeats original dumb validation decision.

Take pride in your work, and do work you can be proud of.

Why this is still not fixed in Windows 10 1803 I can't imagine.

@jgs03177
Copy link

jgs03177 commented Nov 6, 2018

Thanks!

@lipeng1a
Copy link

Thank you! I make it.

@Zhanwei-Liu
Copy link

Thank you!

@Akashdhas
Copy link

thanks boss

@yingmonster123
Copy link

nice!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment