Page 1 of 1

exclude directories from search

Posted: 2015-08-07, 08:58 UTC
by fletzmaus
hello,

often I search for some files within the whole harddisk.
This takes some time. But I know, that the files are NOT in certain directories.

E.G. the directories ".svn", "Program Files", "Windows" and other system dirs contain many data, but usually not my files.

So I would like a feature to exclude certain directories.

Posted: 2015-08-07, 10:19 UTC
by solid
Just select the directiories in which you want to search prior invoking the find files dialog.

Posted: 2015-08-07, 11:02 UTC
by MVV
Unfortunately there is no easy way to exclude directories from search.

Specifying names after a pipe in search request doesn't help to skip dir contents during search.
Adding dir to ignore list does help but it affects on all access aspects, not only searching.
Filtering results using plugins also doesn't help to skip dir contents to during search.
Selecting dirs for searching does help but only for top level dir, not for .svn or .git dirs.
Switching to ignore list for searching does help, but it requires switching to regular ignore list after searching.

Posted: 2015-08-07, 11:26 UTC
by Lefteous
2fletzmaus
In the 'search for' field enter e.g:

Code: Select all

*.* | .svn\;windows\

Posted: 2015-08-07, 11:26 UTC
by Lefteous
I agree that there is no easy way to exclude stuff from search (and that this is the only meaningful way to exclude stuff from search). The main reason is that search for and exclude from search are in the same field. That's perfectly fine for web searches. But for a file search there it's common to exclude the same things from search independent from the search term.

So my idea is not change anything in the search for field. Excluding stuff here specific for the search term is great in a single field.
What we need is a separate exclude from search list (or a list of lists). It might be a good idea to give them names and allow to select more than one.

Posted: 2015-08-07, 12:37 UTC
by MVV
I think it would be useful to specify ignore list for a particular search task, and remember it in search template. Also, some #include command in ignore list to include another ignore list...

Posted: 2015-08-07, 21:43 UTC
by Hacker
MVV,
Specifying names after a pipe in search request doesn't help to skip dir contents during search.

Code: Select all

<Status line> The status line (footer) shows the directory currently being searched, and the file details after the search has finished. With a click on a part of the directory it is possible to skip that directory (after confirmation).
Maybe?

Roman

Posted: 2015-08-08, 06:56 UTC
by Vochomurka

Posted: 2015-08-08, 11:21 UTC
by MVV
Vochomurka,
Am I right that it only adds excluded names to 'search for' field after a pipe? If so, it doesn't really exclude directories because TC will search within them anyway (it only won't list them in results).

Posted: 2015-08-08, 11:59 UTC
by Vochomurka
Yes, you are right. I've missed the discussion you linked to :( So, my script reaches only one goal: avoid redundant info in the result list.