exclude directories from search

Here you can propose new features, make suggestions etc.

Moderators: Hacker, petermad, Stefan2, white

Post Reply
fletzmaus
Junior Member
Junior Member
Posts: 7
Joined: 2015-08-07, 08:52 UTC

exclude directories from search

Post 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.
User avatar
solid
Power Member
Power Member
Posts: 755
Joined: 2004-08-09, 11:20 UTC

Post by *solid »

Just select the directiories in which you want to search prior invoking the find files dialog.
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post 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.
User avatar
Lefteous
Power Member
Power Member
Posts: 9537
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous »

2fletzmaus
In the 'search for' field enter e.g:

Code: Select all

*.* | .svn\;windows\
User avatar
Lefteous
Power Member
Power Member
Posts: 9537
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post 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.
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post 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...
User avatar
Hacker
Moderator
Moderator
Posts: 13144
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Post 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
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
User avatar
Vochomurka
Power Member
Power Member
Posts: 816
Joined: 2005-09-14, 22:19 UTC
Location: Russia
Contact:

Post by *Vochomurka »

Single user license #329241
PowerPro scripts for Total Commander
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post 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).
User avatar
Vochomurka
Power Member
Power Member
Posts: 816
Joined: 2005-09-14, 22:19 UTC
Location: Russia
Contact:

Post 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.
Single user license #329241
PowerPro scripts for Total Commander
Post Reply