Page 1 of 2
Expand/collapse folders inside the detail view
Posted: 22 Aug 2022 17:46
by rolander
I've been looking for a file explorer that can do a Expand/collapse folders inside the detail view like in Mac OS
I mean:
- In detail view you have a list of both folders and files inside the current folder
- Folders has a + or > icon on the left. Clicking on that icon the folder is expanded inside the same list view inside the same folder as it was before.
I've tried many file explorers in windows and none has this functionality.
Just donloaded xyplorer and doesn't seem to have that neither but I would like to ask here just in case I'm missing this feature.
Hopefully it's hidden somewhere or planned for the future.
Any info will be much appreciated.
Re: Expand/collapse folders inside the detail view
Posted: 22 Aug 2022 17:51
by highend
This feature doesn't exist.
Maybe it could be "emulated" by using a paperfolder (scripted...) but you'd need to post a screenshot how this actually looks like (on Mac OS)
Re: Expand/collapse folders inside the detail view
Posted: 22 Aug 2022 17:54
by Horst
For such a function there is a tree display in all File managers.
This tree is synchronized with the details list of files and folders in the panes.
In XY you also have the Mini-tree which makes it much easier.
What is the benefit to have the same functionality in the details panes ?
You can mix files and folders in the details view by View / Sort by / uncheck Sort Folders Apart
and then click on the names column to get them sorted.
Re: Expand/collapse folders inside the detail view
Posted: 22 Aug 2022 18:04
by admin
Or if you're looking for a deep view of an entire branch, use Branch View (View | Views | Branch View).
Re: Expand/collapse folders inside the detail view
Posted: 22 Aug 2022 18:41
by rolander
That would be great!
For the screenshots i've created a folder. Inside that folder i've places 6 files and 4 subfolders. I've copied the same 6 files inside each of the 4 folders
I'm attaching 3 files:
ej1.jpg: Detail view inside of the main/master_folder with every sub_folder collapsed (this is a standard in every file browser)
ej2.jpg: Sub_folder 1 expanded in the same view
ej3.jpg: Sub_folder 1 & 3 expanded in the same view.
Re: Expand/collapse folders inside the detail view
Posted: 22 Aug 2022 18:55
by rolander
Horst wrote: ↑22 Aug 2022 17:54
For such a function there is a tree display in all File managers.
This tree is synchronized with the details list of files and folders in the panes.
In XY you also have the Mini-tree which makes it much easier.
What is the benefit to have the same functionality in the details panes ?
You can mix files and folders in the details view by View / Sort by / uncheck Sort Folders Apart
and then click on the names column to get them sorted.
Hi Horst!
I came here after your recommendation of XYPLORER on the Listary forum some hours ago.
I'f you have the chance to get your hands on a Mac computer. In the finder hitting command+2 get you to this detail view with the addition of the expand/collapse folders inside the same view.
This is really convenient for fast file browsing. It's much more comfortable to just hit the right arrow to expand a folder without leaving the current folder content (in case you want to do that, you just enter to that folder instead of expanding it). You can see its contents and in case you want to collapse it you just hit the left arrow.
Also in case you want to copy or compares files from folder 2 to folder 4, you can do it very fast and easy this way, without having to open tabs, windows or navigating to another pane.
Off course, this can be done using windows file explorer with more (or different) steps. But if you try this feature on Mac OS finder for some time you realize how comfortable and fast is to work this way.
Re: Expand/collapse folders inside the detail view
Posted: 22 Aug 2022 18:57
by rolander
admin wrote: ↑22 Aug 2022 18:04
Or if you're looking for a deep view of an entire branch, use
Branch View (View | Views | Branch View).
Branch view is similar to what I'm looking for, but its like expanding everything (witch in most cases is too much).
The power of this functionality relies in the ability to quickly expand or collapse individual folders. Like a controlled branch view.
Re: Expand/collapse folders inside the detail view
Posted: 22 Aug 2022 19:08
by noembryo
rolander wrote: ↑22 Aug 2022 18:55
This is really convenient for fast file browsing. It's much more comfortable to just hit the right arrow to expand a folder without leaving the current folder content (in case you want to do that, you just enter to that folder instead of expanding it). You can see its contents and in case you want to collapse it you just hit the left arrow.
Also in case you want to copy or compares files from folder 2 to folder 4, you can do it very fast and easy this way, without having to open tabs, windows or navigating to another pane.
+1
Not a Mac user, but it does look very convenient..

Re: Expand/collapse folders inside the detail view
Posted: 22 Aug 2022 19:36
by highend

- Animation.gif (207.71 KiB) Viewed 10091 times
Expands only the selected folders!
The animation shows that the not-selected folder 1 & folder 4 are not expanded while the selected 2 & 3 are expanded
Code: Select all
$sel = <get SelectedItemsNames>;
$folders = listpane(, , 2+4, <crlf>);
$filterSpecc = "";
foreach($folder, $folders, <crlf>, "e") {
if (exists("<curpath>\$folder") != 2) { continue; }
$escaped = regexreplace($folder, "([\\.+(){\[^$])", "\$1");
if (!regexmatches($sel, "^" . $escaped . "$")) {
$filterSpecc .= " AND !path:*\$folder\";
}
}
if ($filterSpecc) {
$filterSpecc = regexreplace($filterSpecc, "^\s*or\s*");
}
goto "<curpath>\? /md=1:flat";
filter $filterSpecc, 1+8;
Re: Expand/collapse folders inside the detail view
Posted: 22 Aug 2022 19:47
by rolander
Looks good Highend! Thank you very much!
As I've just installed xyplorer some hours ago, may I ask where should I insert the code you just shared?
Also, how can I run that script after selecting a folder? On the video you provided it seems like you've done it with a key stroke.
And one last question, is there also a way to collapse one of the open folders? Or the script only provide a way to get into a Branch view with the selected folders opened?
Re: Expand/collapse folders inside the detail view
Posted: 22 Aug 2022 20:05
by highend
Configuration | General | Custom Event Actions
you could use the event "Clicking on Items -> Middle-click on folder"
or "Clicking on Line Number -> Left, Middle or Right-click on line number" (one of them)
use "Run script" as the action and enter the script after clicking on the column entry on the right...

- Animation.gif (286.35 KiB) Viewed 10083 times
And one last question, is there also a way to collapse one of the open folders?
After using the script?
Sure, could be scripted as well (the filter would need to be changed and reapplied, the branch view itself wouldn't be touched).
Re: Expand/collapse folders inside the detail view
Posted: 22 Aug 2022 21:08
by rolander
Thanks a lot for the clear explanation.
I've tried it but even when its a similar function, it's not as practical and confortable as the finder's feature.
I justr grabbed a video so you can watch it. This is just using the arrow keys. Maybe there's some way to come closer to it?
Thanks again!
Re: Expand/collapse folders inside the detail view
Posted: 22 Aug 2022 22:24
by Filehero
. (rubbish)
Re: Expand/collapse folders inside the detail view
Posted: 22 Aug 2022 22:48
by rolander
Filehero wrote: ↑22 Aug 2022 22:24. (rubbish)
Not sure what you mean. Are you referring to the expand/collapse functionality on Finder?
Re: Expand/collapse folders inside the detail view
Posted: 22 Aug 2022 23:56
by Filehero
rolander wrote: ↑22 Aug 2022 22:48
Not sure what you mean. Are you referring to the expand/collapse functionality on Finder?
It's simple: I wrote an reply before checking the/my facts - read: I was wrong.