FOLDERCONTENT - run commands after selection?

I have a button which uses FOLDERCONTENT to allow me to quickly access a number of sub-folders:

Go "C:\Stuff" FOLDERCONTENT="maxdepth=1",nofiles,dblclickmenu

However, once I select one of those folders I'd like to automatically run a series of Dopus commands:

Set QUICKFILTER=(*.exe|*.ini|Shortcut*|*.bat)
Select (install.exe|setup.exe)

Adding the quick filter and select commands after the Go FOLDERCONTENT command under the one button doesn't appear to work (the lister sort of flickers, but only the folder is changed - the filter/selection has no effect).

Is what I want possible when using FOLDERCONTENT?

If not, I'd also be open to having the filter and select applied automatically when any of these folders is browsed to, as opposed to strictly linking it to the FOLDERCONTENT action ie a way for Dopus to detect that the current folder is under C:\Stuff and apply the filter and selection commands.

Thanks!

No, it probably won't:

This can be done via a Preferences / Folders / Folder Formats - Path Formats

Thanks Ixp! I'll give your suggestion a shot. :slight_smile:

I missed the third requirement: a folder format will not select files. For this you'll need a button. Or a script if you want Opus to select the files automatically.

You might be able to use/adapt this to run your commands in particular folders:

(It can be given a list of folders, but doesn't support wildcards. That'd be easy to add, though. I think it also only supports single-line commands, but you could just hardcode the commands you need in the script in place of the single-line configurable command, as a quick & easy method.)

Thanks Ixp. The Path Format option you suggested is close enough to what I want ie filtering to only show the files I want. The selection was more of a 'nice to have'.

Thanks Leo. I've used a wildcard path format for now as Ixp suggested, but when I have some time I'll look at a custom script

@Leo - just an FYI that I was able to adapt the script you linked. The "p" flag in FSUtil.ComparePath was particularly suited to my use case.

Much appreciated!

1 Like