On Windows, the .emacs file may be called _emacs for backward compatibility with DOS and FAT filesystems where filenames could not start with a dot. Some users prefer to continue using such a name due to historical problems various Windows tools had in the past with file names that begin with a dot. The init file may also be called .emacs.d/init.el. Many of the other files that are created by Lisp packages are stored in the .emacs.d directory too, which keeps all your Emacs related files in one place.
All the files mentioned above should go in your
HOME directory is determined by following the steps below:
HOME is set, use the directory it indicates.
HKCU\SOFTWARE\GNU\Emacs\HOME is set, use the
directory it indicates.
HKLM\SOFTWARE\GNU\Emacs\HOME is set, use the
directory it indicates. Not recommended, as it results in users sharing
the same HOME directory.
HOME was not set.
Within Emacs, ~ at the beginning of a file name is expanded to your
HOME directory, so you can always find your .emacs file
by typing the command C-x C-f ~/.emacs.