Expand Folders Command

FWIW, if you're eager to try out the version with this included, feel free to send me a message to get it.

Hi!, first of all, what an incredible script, thank you for this.

I want to ask you about this one. I regularly use this command ExpandFolders TOGGLE and recently ExpandFolders TOGGLE=expandtop, the thing is that when nothing is selected and hit ExpandFolders TOGGLE it expands all of the folders on the lister (as expected) and when hit it again with a folder selected it collapses it (again as expected), but then when i hit ExpandFolders TOGGLE=expandtop with a folder selected it expands all of the folders inside. I would expect to just expand it on the first level (in the example below, to not expand the audio folder). Is there a way to change it's behavior?

Thanks.

Thank you!
At least in my tests, that doesn't happen. Make sure that Preferences / File Displays / Folder Expansion > Collapse subfolders within collapsed folders is checked, as otherwise, when collapsing folders, not all levels may close. (the command respect that option).

Ah, that was it, TY!

v2.0.0 (May 13, 2024):

  • Added new arguments:
    • SNAPSHOT: Allows saving the current state of a path, related to expanded/collapsed folders state and the focused item (depending on the configuration). Can be used with other arguments.
    • SNAPSHOT=restore: Allows restoring a previously saved state, along with the focused item (depending on the configuration). Cannot be used with other arguments.
    • CLEARSNAPSHOTS: Deletes ALL currently saved snapshots.
  • Enhanced the collapsing part. It now detects whether Preferences / File Displays / Folder Expansion > Collapse subfolders within collapsed folders is disabled and collapses all levels accordingly, even in that scenario.
  • New entries in Script Configuration: Clear Snapshots after X days and Focus when restoring (both explained in Configuration).
  • Other minor corrections.
1 Like

Hi!, great update, one thing tho, apparently i can no longer toggle in folders that are not on the same level, i recorded a video comparing 1.6 vs 2.0

Video

Thank you very much for noticing! Corrected and re-uploaded as v2.0.1.

2 Likes