Page 1 of 1

Ignore list of directories when performing Alt-F7 searches

Posted: 2018-02-13, 16:36 UTC
by Polarbear
My searches for files are often slow because because searched folders contains folders with large amounts of files that I generally do not want to search.

Examples of folders that I almost always want to ignore in searches (being a :NET developer):

.git - Git repository folder
node_modules - Downloaded node packages
packages - Downloaded .NET packages

I would like to see the addition of an exclude folders field to the Alt-F7 dialog, similar to "Find text" field (checkbox in front and with history).
Field should accept input like:

.git;node_modules;packages

Posted: 2018-02-14, 09:35 UTC
by petermad
From the Help:
All masks after the pipe character | will be treated as exclude masks.

To include/exclude certain directories in the search, wildcards can be used in include/exclude directory names, and the names must have a trailing backslash \

Examples:

*.htm? | _vti*\ finds all html files, except in subdirs starting with _vti
is that to any avail?

Posted: 2018-02-14, 12:12 UTC
by Polarbear
Thanks, I was not aware of that operator (The pipe character), and it lets me do the searches much faster.

Example:
*.csproj | node_modules\ .*\ packages\ obj\ Deploy\

I'm not a fan of this syntax (too much information crammed into one input field) but I guess it will do the job.
petermad wrote:From the Help:
All masks after the pipe character | will be treated as exclude masks.

To include/exclude certain directories in the search, wildcards can be used in include/exclude directory names, and the names must have a trailing backslash \

Examples:

*.htm? | _vti*\ finds all html files, except in subdirs starting with _vti
is that to any avail?