Page 1 of 1
Expand Multiple Folders
Posted: 21 Oct 2020 13:27
by mrbosco
Is there a quick way to expand multiple folders one level?
IOW, from the root folder I'd like to select several folders and have the tree open up the selected folders one level?
Re: Expand Multiple Folders
Posted: 21 Oct 2020 13:47
by highend
Re: Expand Multiple Folders
Posted: 21 Oct 2020 15:36
by mrbosco
I'm not really looking for a branch view where all the files are combined.
I'm trying to have a tree format where all of the original folders are opened one level.
Re: Expand Multiple Folders
Posted: 21 Oct 2020 15:57
by highend
You mean from this:
1.png
to this:
2.png
?
Re: Expand Multiple Folders
Posted: 21 Oct 2020 16:06
by mrbosco
From your Program Files example I would like the left side to open crucial, dotnet and the rest of the folders opened as if each branch was clicked on. I would really like if several selected folders would do the same thing.
Re: Expand Multiple Folders
Posted: 21 Oct 2020 16:12
by highend
Then show your screenshots with three selected folders a.) before and b.) after <whatever should be done there>
Re: Expand Multiple Folders
Posted: 21 Oct 2020 16:43
by mrbosco
In the Before screenshot I'd like to select Folder's C and D.
I'd like to do some command to easily wind up with the after where the left side is expanded without having to double click each individual folder (C and D)
Re: Expand Multiple Folders
Posted: 21 Oct 2020 16:49
by highend
And what exactly is different in your example in comparison to my screenshots? oO
I selected three folders and they were opened up in the tree for only one level...
Write a script that loops over the selected folders, get the subfolders of these folders and use showintree for the first subfolder (for each folder)...
Re: Expand Multiple Folders
Posted: 21 Oct 2020 16:56
by mrbosco
You are correct. I was a bit confused about the before and after in your example.
I'm sort of a novice when it comes to writing scripts.
Can you please show me an example?
Re: Expand Multiple Folders
Posted: 21 Oct 2020 16:57
by highend
Code: Select all
$items = <get SelectedItemsPathNames <crlf>>;
foreach($item, $items, <crlf>, "e") {
if (exists($item) == 2) {
$subFolder = quicksearch("/n /d /limit=1", $item);
if ($subFolder) { showintree $subFolder; }
}
}
Re: Expand Multiple Folders
Posted: 21 Oct 2020 17:05
by mrbosco
Perfect! Thank you! Been trying to figure out how to do this for a long time.
Glad I asked,