Go to Folder and Select all via Dopusrt

Hi all,

I have a 3rd party program which upon a particular system event returns the path of a particular folder ("%path%")and launches Dopus in that folder by running Dopus.exe with the parameter "%path%". The 3pp has the facility to add additional parameters to the Dopus command line but cannot pass the "%path%" data to dopus in any other way. The 3pp could run Dopusrt instead of Dopus if necessary.

I would like Dopus when so launched to run one or more Dopus commands. Initially I would like it to run the "Select ALL" command on that folder.

I thought perhaps this could be accomplished by:

C:\Program Files\GPSoftware\Directory Opus\dopusrt.exe /cmd Go %path% /cmd Select ALL

but apparently not. I suppose what I am trying to do is run two commands from 1 dopusrt and maybe you can't do that. Other posts about multiple commands have suggested creating a user defined command; I can't do that without a way of getting the %path% data into Dopus via a command line switch.

I thought of running Dopusrt twice, once for each command, but unfortunately there is no way for the 3pp to do that.

I suppose it could be done by the 3pp launching a little program which in turn launches Dopusrt twice but it seems inelegant to do so.

Any ideas?

User-defined commands can take arguments.

Create MyCommand, set the command template to PATH on its own (which means there's is one argument called "PATH" which is the default argument).

For the body of the command:

Go "&PATH&" [ Select ALL ]

(The square brackets are an embedded function which ensure the Select ALL is run in the new folder.)

Then you can run it via:

"C:\Program Files\GPSoftware\Directory Opus\dopusrt.exe" /acmd MyCommand "%path%"

(Note that /acmd is usually preferable to /cmd.)

If you have any control over the 3rd party program, making it use a variable name other than %path% would be a good idea, because %path% is already used by Windows and has a very important meaning. Changing %path% is a very bad idea.

Thanks Leo, sorted.