Skip to content

Instantly share code, notes, and snippets.

@ozh
Created November 22, 2012 13:44
Show Gist options
  • Select an option

  • Save ozh/4131243 to your computer and use it in GitHub Desktop.

Select an option

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
Copy Markdown

Thank you, good tricks

@sayantansinha
Copy link
Copy Markdown

just awesome, saved the day for me!!

@ur0n2
Copy link
Copy Markdown

ur0n2 commented Mar 21, 2017

awesome!!

@zur4ik
Copy link
Copy Markdown

zur4ik commented Apr 11, 2017

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

@garbinmarcelo
Copy link
Copy Markdown

@RahulSDeshpande
Copy link
Copy Markdown

Good one, thanks :)

@Subfire
Copy link
Copy Markdown

Subfire commented Dec 5, 2017

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

@chanchal19
Copy link
Copy Markdown

it shows
you must type a correct folder name

@NGhebreial
Copy link
Copy Markdown

Thanks a lot!
Windows causes me headache...

@Freelix
Copy link
Copy Markdown

Freelix commented Apr 19, 2018

Thank you, really helpful !

@Dlaiven
Copy link
Copy Markdown

Dlaiven commented May 25, 2018

Thank you!

@akaban01
Copy link
Copy Markdown

cmd worked for me, thank you!

@whereisaaron
Copy link
Copy Markdown

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
Copy Markdown

jgs03177 commented Nov 6, 2018

Thanks!

@lipeng1a
Copy link
Copy Markdown

Thank you! I make it.

@Zhanwei-Liu
Copy link
Copy Markdown

Thank you!

@Akashdhas
Copy link
Copy Markdown

thanks boss

@yingmonster123
Copy link
Copy Markdown

nice!

@Rynex-te
Copy link
Copy Markdown

Rynex-te commented Dec 2, 2024

Thanks!

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