Instantly share code, notes, and snippets.

Embed
What would you like to do?
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

This comment has been minimized.

malah-code commented Oct 7, 2016

Thank you, good tricks

@sayantansinha

This comment has been minimized.

sayantansinha commented Feb 17, 2017

just awesome, saved the day for me!!

@ur0n2

This comment has been minimized.

ur0n2 commented Mar 21, 2017

awesome!!

@zur4ik

This comment has been minimized.

zur4ik commented Apr 11, 2017

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

@marcelogarbin

This comment has been minimized.

marcelogarbin commented Aug 16, 2017

@RahulSDeshpande

This comment has been minimized.

RahulSDeshpande commented Nov 27, 2017

Good one, thanks :)

@Subfire

This comment has been minimized.

Subfire commented Dec 5, 2017

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

@chanchal19

This comment has been minimized.

chanchal19 commented Mar 18, 2018

it shows
you must type a correct folder name

@NGhebreial

This comment has been minimized.

NGhebreial commented Apr 12, 2018

Thanks a lot!
Windows causes me headache...

@Freelix

This comment has been minimized.

Freelix commented Apr 19, 2018

Thank you, really helpful !

@Dlaiven

This comment has been minimized.

Dlaiven commented May 25, 2018

Thank you!

@akaban01

This comment has been minimized.

akaban01 commented Jun 25, 2018

cmd worked for me, thank you!

@whereisaaron

This comment has been minimized.

whereisaaron commented Jun 30, 2018

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

This comment has been minimized.

jgs03177 commented Nov 6, 2018

Thanks!

@lipeng1a

This comment has been minimized.

lipeng1a commented Dec 17, 2018

Thank you! I make it.

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