I can restrict Finder searching files by adding .noindex -extension, this thread. However, I want hide those files in Finder search.
How can you prevent Finder from showing .noindex -files?
Ask Different is a question and answer site for power users of Apple hardware and software. It only takes a minute to sign up.
Sign up to join this communityThere are a variety of ways to hide things in Mac OS X. Note: if you do any of these you most likely do not need to use the .noindex
extensions since files hidden from the finder will not be typically be shown in Finder Spotlight searches.
chflags hidden fileToHide
(as already mentioned) does this by setting OS X file attributes..fileToHide
, of course this will hide the file from the Finder and the command line. .hidden
at the file system root and list the filenames of files to hide from the Finder. This was the way to do it in the first several versions of Mac OS X prior to the chflags method. Note that the various hiding methods and .noindex should all work on Folders too.
In the command line use:
chflags hidden fileToHide
To show files again chflags nohidden ...