Hiding files on your Mac is not easy, and Spotlight is the reason why. Without a doubt, OS X has a very smart file indexing feature – a little too smart even, making it really hard to get around it. Hiding or protecting your files in the absence of an efficient encryption tool is a challenge in itself. The problem with encryption tools is that you have to go back & forth between encrypting and decrypting files whenever you need to access or modify them. It’s one area where Windows’ users have it easy. Coming back to Spotlight, the feature is what will most likely help someone find the files you want to hide the most. There is a built-on option to mark files that Spotlight shouldn’t index but it isn’t as effective as it should be. Here’s a much faster way to get the same results.
Whether it’s a file or folder you want to hide i.e. have Spotlight ignore in its searches, all you need to do is add the ‘noindex’ extension to the end of the file or folder’s name. If, for example, you have a folder named T-Rex, you can rename it to T-Rex.noindex, and it will no longer be indexed by Spotlight. Do the same for a file, and it will also be removed from the index. If you have trouble editing the file’s extension, you can go to its ‘Get Info’ window and edit it under ‘Name and Extension’.
You can remove file from the index from Spotlight’s preferences or disguise files as apps as well, but adding the .noindex extension has two advantages. Firstly, any and all files within a folder that’s been marked ‘noindex’ will also be excluded from Spotlight’s index. This means you only need to create one folder, and add all your classified files to it to hide them all from Spotlight searches. Unlike the method involving Spotlight’s preferences, there is no way a user can trace these folders if they aren’t just lying there on your desktop or another obvious location. Secondly, if you remove files by adding them to the exclusion list in Spotlight’s preferences, anyone can go to the preferences screen to view which files or folders you have chosen to hide there, and even restore them to the index by removing them from the list.
This method does pose some complications when used for files; with the file extension changed to .noindex, it is hard to identify the file type. It’s best to add files to a folder instead; that way you avoid the lengthy process of renaming files each time you view them, and can easily hide any files by simply moving them to that folder.
[via OS X Daily]