Sunday, December 11, 2016

How To Hide Files And Folders In Your File Manager Without Renaming Them Quick Tip

How To Hide Files And Folders In Your File Manager Without Renaming Them Quick Tip


Usually if you want to hide a file or folder so it doesnt show up in your file manager, you can rename it by adding a dot (".") at the beginning of the filename.

However, there are situations in which you may want to hide a file or folder without renaming it. For instance, some applications insist on creating a folder in the users home directory or in the Documents folder (and they cant be renamed) and so on. But I dont want these folders cluttered - I want to easily find what Im looking for.

Nemo hidden folder

For such situations or whatever other reasons, theres another way of hiding files and folders (prevent them from showing up in the file manager only): you can create a file called ".hidden" (theres a dot in front of "hidden" so this is a hidden file!) and in this file, enter the name of the files and folders you want to hide, each on a separate line. Then, refresh the folder (press F5 or Ctrl + R) and those files or folders should no longer be visible in your file manager.

This should work (at least, it worked in my test) with the following file managers: Nautilus, Nemo, Caja, Thunar (Im not sure when this was introduced but I can tell you that it doesnt work with version 1.2.2 available in Xubuntu 12.04; it does work with versions 1.6.3 and newer) and Pantheon Files (from Freya only), but there might be others to support it.

Note: for Thunar youll need to navigate to a separate folder for the changes to be applied, refreshing isnt enough.

Heres an example: lets assume you have a folder called "FOLDER1" and a file call "FILE1" in your home directory and you want to hide both without renaming them. To do this, create a file called ".hidden" in your home directory and in this file, add the following two lines:
FOLDER1
FILE1

Then save the file and press F5 to refresh the home folder - "FOLDER1" and "FILE1" shouldnt be displayed any more.

Extra tip: HEREs a Nautilus extension which allows hiding files and folders using this method via the context menu.


Available link for download