GP SoftwareTwitter
Opus FAQsManualCommandsObjects

Open folder if not exist user defined function

If someone could help me creating this script, I would really appreciate it!
I have 2 folder paths:

  • c:\test\leftfolder
  • c:\test\rightfolder

I want to check if "c:\test\leftfolder" is already open in the LEFT lister.
If it is open in the LEFT lister then active that tab in the LEFT lister
If it is not open in the LEFT lister then open it in a new tab in the LEFT lister

I want to do the same for the "c:\test\rightfolder" but now for the RIGHT lister

The script would be used as an user defined function and would be called "OpenIfNotExist"
Because I need to pass in 2 folderpaths, I wanted to pass those paths like this?

DOPUSRT /cmd OpenIfNotExist "c:\test\leftfolder" "c:\test\rightfolder"

(or other way?)

User command template would be: LEFT,RIGHT

Command would be:

Go "&LEFT&" OPENINLEFT NEWTAB=findexisting

1 Like

Yes this works!
I passed the 2 folderpaths like this:

DOPUSRT /cmd OpenIfNotExist "c:\test\leftfolder" "c:\test\rightfolder"

And then dopus activated in the corresponding the existing tab and open in new tab the if not existing!
Thank you again!