When we select some Name column cells, i.e. files or folders (not date or type column cells etc), from the file display with folder expansion is enabled, it would be great if we could copy the selected cells as a tree representation. Meaning, something similar to using the Windows tree
command.
Normally I can run tree
on a path (e.g. via a button script), then edit it after the fact in a text editor to remove any unwanted files or unnecessarily deep paths from the tree representation, but this is tedious and error prone. This proposed feature would be like a live edit of the final tree representation before you copy it.
So for this example cell selection from the Name column:
Using the tree /F
command's output style as a guide, we'd copy:
Note the lack of broadcast.js since that Name cell isn't selected (despite the steamui folder being selected and expanded), as well as the lack of the unselected file cells directly under Steam.
C:\Program Files (x86)\Steam
│ GameOverlayUI.exe.log.last
│ Steam.dll
│ steam.exe
│
├───steam
├───steamapps
├───steamchina
├───steamui
└───steamui-public
The difference between this FR and tree
is that tree
can only accept a single path and it always goes to the max depth. This FR however would limit the tree representation to the selected cells -- or just the visible cells under the selected expanded folder cell.
I imagine 2 hypothetical options to be added to selected cells' right-click menu:
- Copy to Clipboard (tree as selected) (like the example above).
- Copy to Clipboard (tree as expanded) (like the example below).
In this second example, only 2 cells are selected, but we could use the just mentioned Copy to Clipboard (as expanded) option instead which would copy the following tree representation to the clipboard:
Note the inclusion of broadcast.js this time and all the files beneath Steam, also, the RivaTuner Statistics Server folder is included, but because it's not expanded, only the folder is added to the tree representation, not any of its contents.
C:\Program Files (x86)\RivaTuner Statistics Server
C:\Program Files (x86)\Steam
│ GameOverlayUI.exe.log.last
│ Steam.dll
│ steam.exe
│ steam.signatures
│ Steam2.dll
│ <other file cells beyond the screenshot>
│
├───steam
├───steamapps
├───steamchina
├───steamui
│ broadcast.js
├───steamui-public
└───steamui-public
Presumably this feature would be limited to only when folder expansion is enabled as I'm not sure how well it would work in flat view for example. I'm also not sure how well I explained the idea, or if it's worth the effort to implement, but the idea came over me and I thought I'd see it through. Would anyone else find this useful?
Thanks.
Opus 13.7.1