How do I exclude a certain folder name from the Eclipse file search (CTRL + H)? For example if I want to search all files, but exclude any files in a folder called FolderName (and its subdirectories), what can I enter in the file name pattern to accomplish this?
How do I exclude a certain folder name from the Eclipse file search (
Share
I have a couple options for you.
First Option
If it is feasible, select the range of folders you want to search, then Ctrl – click any folders you want to exclude from the search. Press Ctrl – H to open file search, then under
Scopechoose theSelected Resourcesoption.Second Option
Right-click the folder to exclude, select properties, check
Derived, and apply. This works because by default File Search will exclude derived resources. After the search you can undo theDerivedsetting.Note that I’m not familiar enough with the inner workings of Eclipse to be certain about potential side effects of temporarily marking files as derived like this, but I suspect it should be okay.