How to create files like .htaccess on windows

So you want to create a .htaccess or any other .extension and you fire up the explorer and start doing it, and you get

Create htaccess error dialog

Error: You must type a filename

How to create a file only with extension

  • Fire a command line terminal and go to your destination folder (cd ...)
  • Type in
    echo > .htaccess
    and Press ENTER.
  • Now goto the explorer and edit the just created new empty file and save it.
  • Voila !
29 Feb, 2012
Comments (1)
  • 05/03/2014_22:09:18,97
    C:\Users\kampar>touch .htaccess
    'touch' is not recognized as an internal or external command,
    operable program or batch file.

    C:\Users\kampar>set path=%path%;E:\w32\cygwin\

    C:\Users\kampar>touch .htaccess

    C:\Users\kampar>copy con .htaccess
    deny all
    Overwrite .htaccess? (Yes/No/All): y
    1 file(s) copied.


    By kampar on 05 Mar, 2014
You may also like
On Facebook
Email Newsletter