Automatically execute commands per path (e.g. via Folder Formats)

I think I’d be helpful if DOpus offers an easy way to execute (multiple) commands when entering a specific folder. This would offer many customization options to power users - for example, to enable flat view, expand sub-folders, customize toolbars/GUI etc.

I’m aware this can be done via scripting (e.g. using OnAfterFolderChange) and a script like Trigger Flat View (or any other command) in configured folders .

However, I think adding such a feature to e.g. folder formats using a “Folder Entry Script” tab would be much more user friendly. (Saving the user from having to maintain multiple scripts, parsing/matching paths that define applicability of commands, making it easier to execute more than one command etc.)


Related: Perform command on entering folder? (I didn’t add it there because the user’s request is on a very specific use-case, mine is more general.)

1 Like

I don't see what you'd gain from that when you can already do it via scripting with much more flexibility. The complexity won't be any different.

You don't need multiple scripts for it. One script could do it all, using whatever rules and commands you want. Managing it via folder formats would probably be more complex, not less.

Thanks @Leo.

I’m not familiar with JScript. The script introduced in Script For Running Various Commands When Entering Specific Paths is cool, but still doesn’t provide things like regex-matching of paths, multi-line commands etc. Still, the script has almost 500 lines of code - this is not something I blindly want to copy from another user and run; and it is also not something I want to develop and maintain myself.

Thus, I don’t share your opinions that users don’t gain from a built-in solution and that the complexity of built-in vs. scripting isn’t any different.

Btw, it doesn’t need to be part of Folder Formats. Maybe a new “Folder Scripts” section would be a better fit. Folder Formats just provide nice selection mechanisms (paths, regex, content) already.