14

I have some files that will be accessed across several platforms (Mac OS X and Windows 7 mainly, but I wouldn't rule out Linux in the future) and I do not want these files indexed by the search services of the platforms (there will be some DB dumps and I don't want sensitive info put into the search tables).

As I recall, I can block indexing of a directory in OS X by placing a specially named file there (it may have line of text inside of it, it's been a while and I don't remember). Is there something like that in Windows?

How do I block indexing of a certain directory for Mac OS X, Windows (and possibly Linux)?

  • The question is too broad, as each system needs to be configured separately and there is no magic way of disabling indexing folder across multiple platforms other than securing access to it. – kenorb Apr 8 '15 at 19:13
14

Windows Search only indexes a few locations by default (see screenshot below); all others have to be included specifically in the index. To edit the settings just start typing "indexing options" or "search" in the Start Menu search box and click the relevant result:

1

There you can see the currently indexed locations and modify them as required:

2 3

You can also change advanced indexing options if required:

5 6

  • 1
    Is it possible to exclude a path mask? I want to exclude node_modules that is present in every node.js repository. – Qwerty Feb 15 '18 at 10:45
3

You can exclude a folder from the Spotlight index from System Preferences, by adding .noindex to the end of its name, or by creating an empty file named .metadata_never_index inside it.

mdutil -i off can only be used with volumes (like mdutil -i off /Volumes/volumename/).

To remove existing indexes, you can delete /Volumes/volumename/.Spotlight-V100/ or run mdutil -E /Volumes/volumename/.

  • Ah, that's the OS X filename! Do you know how to also block indexing of a directory in Windows too? – CyberSkull May 4 '13 at 19:32
  • Making .metadata_never_index files doesn't have any effect on 10.13 (renaming the folder to have .noindex on the end does work though). – Anon Aug 11 '18 at 8:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.