Page 1 of 1
Quick search in the directory tree
Posted: 07 Jul 2022 17:15
by daandi
Hello!
I have a question:
I love the quick search/filter function from XyPlorer to search for files in one directory or a file list.
Is there something comparable with which you can also apply a quick filter to the directory tree (with subdirectoryies)?
thank you
CB-Crew, Andreas
Re: Quick search in the directory tree
Posted: 07 Jul 2022 18:54
by Horst
View / Views / Branch view
Then you can apply Quick search
Re: Quick search in the directory tree
Posted: 07 Jul 2022 20:56
by daandi
Hello Horst!
thank you very much for your reply, but I think the use of the flat view in my case would be too complicated.
The drive has 215.000 files and 60.500 folders. Quick search first reads all files and folders, shows them all and then starts to calculate all folder sizes. On my computer it takes about 30 seconds to finalize this folder size calculation.
OK, I did find the syntax for flat view (/flatdirs) etc.. This is of course very powerful, but not easy to navigate. The full list comes sorted, by modified date (in my case). Sorting the list by name or path doesn't help me either. Every time I change search filter it has to reread the directory structure.
* My wish
What I was looking for, was a filter field on top of the treeview area, where I can enter the search term and than a filtered tree, that only shows the directory(s) that contain the term, is shown. In natural order (same order as the directories are on the hard disk).
Like a searchable mini tree..
A tree view without the directories that do not fit, in the same order as the full tree...
Maybe I should write this in the board of additional wishes.
Maybe someone can also help me to formulate this a little more clearly and maybe that would be a great new feature....
Re: Quick search in the directory tree
Posted: 07 Jul 2022 21:08
by highend
There is currently only one way to do that: Scripting...
And it requires a mini tree (and probably two user defined commands / buttons)...
Re: Quick search in the directory tree
Posted: 10 Jul 2022 13:37
by daandi
Oh dear, I think Scripting is too complicated for me...
Wouldn't a
"TreeSearch" be a
nice new feature in XyPlorer ?

Re: Quick search in the directory tree
Posted: 20 Jul 2022 11:41
by admin
a tree filter... hmmm... it's not such a bad idea... does it exist anywhere? never heard about it...
I assume we're only talking about the terminal leaves of a branch, otherwise the tree would quickly disappear entirely.
Re: Quick search in the directory tree
Posted: 30 Jul 2022 23:32
by daandi
I think that this can be a very interesting feature for sure. There is certainly to consider exactly how the search should look in detail. Unfortunately I don't know of any other software where you could get some inspiration on how this should look in detail.
One possibility could be to highlight the branches in the directory tree, or to show only the branches that contain the searched term. Or simply a window with the search results. A list with all the paths, in which the searched term is contained.
But there would be many other possibilities to plan something great new

Re: Quick search in the directory tree
Posted: 31 Jul 2022 08:49
by admin
Yeah, needs more thinking. Speed is also a factor (i.e. it might be too slow). I'll consider it...
Re: Quick search in the directory tree
Posted: 06 Aug 2022 13:57
by daandi
Yes these directory trees and structures can become quite large...
An exclusion filter, which excludes directories from the search, would certainly also make sense. Like it already exists with the file search function.
For example there is the "Eagle" application (
www.eagle.cool). A very interesting image/file management software, but for each captured image it creates its own directory. There are quickly thousands of subdirectories.
You must be able to exclude such "bad guys" from the search...
Re: Quick search in the directory tree
Posted: 06 Aug 2022 16:24
by admin
Check out the Excluded tab on Info Panel / Find Files (Ctrl+F).
Re: Quick search in the directory tree
Posted: 23 Aug 2022 14:52
by daandi
I was thinking about a new search feature in the directory tree.
Re: Quick search in the directory tree
Posted: 23 Aug 2022 16:06
by highend
For mini trees only...
Search script:
Code: Select all
end (!get("#489")), "No mini tree in use, aborted!";
$input = trim(input("Search keyword..."));
if ($input) {
$tree = get("tree", <crlf>);
$esc = regexreplace($input, "([\\.+(){\[^$])", "\$1");
$matches = regexmatches($tree, "^.*?" . $esc . ".*?(?=\r?\n|$)", <crlf>);
$cntMatches = gettoken($matches, "count", <crlf>);
end (!$cntMatches), "No match(es) found...";
perm $P_SAVED_MINI_TREE = $tree;
loadtree replace($matches, <crlf>, "|");
status $cntMatches . (($cntMatches == 1) ? " entry" : " entries") . " found...", , "ready";
}
Restore last mini tree to its state before the last search (this needs to be done after each search^^):
Code: Select all
loadtree replace($P_SAVED_MINI_TREE, <crlf>, "|");