Spotlight is a very ingenious "tool" of OS X, attributable in no large part to its indexing feature. Hiding various files & folders is challenging even when using various encryption applications. I am aware there is a built in option, that allows you to mark as necessary, files, folders etc that Spotlight should not index.

Are there more effective, (possibly faster methods) of hiding files & folders from Spotlight's "prying eyes", therefore in essence protecting you from other prying eyes that may have access to your Mac ?

2 Answers 2

  • Create a file named .metadata_never_index inside a folder.
  • Rename folders or files so that they end with .noindex.
  • If you only want to hide files from the GUI, move them to a system folder like ~/Library/.
  • Move the files to a folder that starts with a period like ~/.fontconfig/. It doesn't remove them from mdfind queries like mdfind 'kMDItemFSName=*' -onlyin ~/.fontconfig/ though.

Related questions:

  • 1
    Excellent including reference to related questions as well....thanks
    – Simon
    May 31, 2013 at 12:15
  • 1
    The noindex extension in your answer seems to convey a no. of advantages: all files within a folder that’s been marked noindex will also be excluded from Spotlight’s index - that means the need to create just one folder and another user cannot trace these folders unless lying around - correct me if i'm wrong :)
    – Simon
    May 31, 2013 at 14:52
  • 5
    In my experience (macOS Yosemite, El Capitan and Sierra) the .metadata_never_index file only works at the Volume level (.e.g in the root of an external hard drive), not at the folder level. The .noindex suffix works though.
    – Nate
    Jan 13, 2018 at 18:13

Another take on this from a different angle is to use an App called Obscurity.

Unlike marking them as hidden files or adding them to an encrypted drive, the app itself acts as a cover for your files. It creates a mock folder that looks like a normal one, but will not open when double clicked. To be able to open it, you need to right-click the folder and select the Show Package Contents option.

enter image description here

Once installed, make sure the app’s folder is not on your desktop or you will not be able to copy files to it. Adding it to the Dock will also prevent you from adding files to it. Open the folder by right-clicking it and selecting the Show Package Contents option. If you don’t see this option, it means you’re accessing the app. Right click and select Open to bypass Gatekeeper and you will find a folder named Obscurity in the window that opens. Double clicking to open the folder will either yield an error or an empty folder. Open it via the Show Package Contents option and drag files over this folder. Close it when you’re done.

The files will not be indexed by Spotlight and will not appear in All Files in Finder. The best thing about this app is that it accomplishes its purpose of hiding your files.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .