#21: Eclipse: exclude directories from file searches

In Python / Pylons projects, there is often a data directory consist of semi-compiled text used for template generation. It would be useful if I can skip searching over these files while working in Eclipse. Eclipse has a functionality to search for strings across all files in a given project. To access it, go to the absurdly named Search -> Search... menu item. Because of course, "Find in Project..." would be way too obvious for Eclipse UI designers.

While you can exclude (or explicitly include) certain types of files in the Search by using the File Name Patterns field in the Search box, there seems to be no obvious way to exclude entire project directories from the search.

Use an Eclipse working set

In the Search box, there's an option to search within the "Working Set", which allows you to pick the directories and files that you want searched. You define a working set by selecting the Choose... button, hitting New, and then picking the directories you want included within the new dialog box (three levels of dialogs...what the hell, Eclipse?). You must then encounter additional mental friction to explicitly name your working set, and then finally choose "Working Set" in the Scope field of the Search box.

All of this to exclude a damned directory.


  1. Working set is a good solution if you want to search only in certain projects in your workspace. My scenario is I want to do a search in whole workspace and exclude all .svn folders .... Any ideas on how to achieve this. I am aware of few SVN Plug-in`s that could help .. If there is any other way please elaborate.

    Anubhav on August 04, 2009, 03:46 PM UTC
  2. @Anubhav Hm, I've never had that problem. As far as I know, installing a plug-in like Subclipse would automatically exclude .svn directories from searches. Other than that, I'm not sure.

    yiming on August 04, 2009, 03:56 PM UTC

Think you've got a better solution? Help 92049143cabb7ba896d7c06e19906303_small yliu out by posting your solution