Hiding files/folders which begin with a full stop (period)

ATTRIB +H /s /d C:\.* is the command to hide anything, directories included that start with a dot

This won't list the files (as stated below), but will hit every file it can access, and apply the Hidden attribute.

Once this is done, you can make sure that the Folder Options are set to hide hidden files. Click on Start, type folder options and press Enter. Click on the View tab, then choose Don't show hidden files, folders, or drives under Files and Folders \ Hidden files and folders. Hit Apply, then OK (or just OK).


Simple:

In Windows Explorer

  1. Right click on the .folder you want to hide;
  2. Click properties, then click on the general tab;
  3. Click on hidden.

Done.

PS Only checked on Windows 7 Professional. PPS I noticed your question asked for doing this automatically. Clearly this won't cut it, but maybe readers find it useful.


Windows will hide files with the hidden or system flag. Or files may be hidden using ACL. Windows does not hide files based on filename.

To explicitly have Windows to hide files by filename, you'll need to explicitly create the feature. Either a file system driver (it use to be common for viruses to have this "feature") or a shell extension hack will work in this case.

On a side note, you can fake the feature by turning off "view file extensions" under Folder Options, since, to Explorer, a file that starts with a dot is a file with an extension, but no name.