Switches / arguments on launch to highlight a file

I'd like to pass DOPUS some arguments on launch to highlight a selected file when it opens. With Windows Explorer, you can do it like this:

"C:\WINDOWS\explorer.exe" /e,/select,"%1"

Is this possible with DOPUS? I tried the same syntax...

"C:\Program Files\GPSoftware\Directory Opus\dopus.exe" /e,/select,"%1"

...and it didn't work.

Thanks for any help you can offer.

Have you looked at Dopusrt.exe?


1 Like

If it's a file, this will open the file's parent folder and select the file:

"C:\Program Files\GPSoftware\Directory Opus\DOpusRT.exe" /open "%1"

(If it's a folder, that will open the folder itself. If you need it to open the folder's parent and select the folder, that's possible but slightly more complex.)

Note that if you're doing this from code, you can use the Windows API for showing the parent folder and selecting something. If Explorer Replacement is enabled in Opus, the API will be redirected to Opus, and your code does not have to worry about whether the user has Opus or File Explorer or what the default file manager is, as it's taken care of automatically.

Thanks so much, Leo. This works perfectly for my needs!

1 Like