How to get the current destination path/Selected Item Via DopusRT?

I am currently in the process of giving major upgrades to a PowerShell module/library for Directory Opus.

I have been messing with the Cli tool DopusRT, as that is the backend tool I am relying on. One bit of information I cant seem to get is the destination directory/selected objects of the most recently active Lister.

For example, if I have a lister like the above, lets say its the most recently active lister, and I simply want to get:

  • The Source's current tab's folder path and its selected items, which are:
    • C:\Temp\source1
    • C:\Temp\source1\source1.dcf
  • The Destination's current tab's folder path and its selected items, which are:
    • C:\Temp\dest1
    • C:\Temp\dest1\dest3.dcf

I can reliably get the Source's folder path and selected objects with:

 . "C:\Program Files\GPSoftware\Directory Opus\dopusrt.exe" /info Some/Path ","list

Which returns:

<?xml version="1.0"?>
<results command="list" result="1">
	<items display_path="C:\Temp\source1" lister="0x19076c" path="C:\Temp\source1" tab="0x350864">
		<item id="2" name="source1.dcf" path="C:\Temp\source1\source1.dcf" sel="1" type="0" />
		<item id="3" name="source2.dcf" path="C:\Temp\source1\source2.dcf" sel="0" type="0" />
		<item id="4" name="source3.dcf" path="C:\Temp\source1\source3.dcf" sel="0" type="0" />
	</items>
</results>

But I am struggling with getting the Destination's folder path and its selected objects. I tried using the paths command for DopusRT :

<?xml version="1.0"?>
<results command="paths" result="1">
	<path active_lister="0" display_path="C:\Users\..." lister="0xe0a5e" side="1" tab="0xa50b74">C:\Users\...</path>
	<path active_lister="0" active_tab="2" display_path="C:\Users\..." lister="0xe0a5e" side="2" tab="0x1140840" tab_state="1">C:\Users\INDESK\. .</path>

	<path active_lister="1" active_tab="1" display_path="C:\Temp\source1" lister="0x19076c" side="1" tab="0x350864" tab_state="1">C:\Temp\source1</path>
	<path active_lister="1" display_path="C:\Temp\source2" lister="0x19076c" side="1" tab="0x3f0cc6">C:\Temp\source2</path>
	<path active_lister="1" display_path="C:\Temp\source3" lister="0x19076c" side="1" tab="0x980bf4">C:\Temp\source3</path>
	<path active_lister="1" active_tab="2" display_path="C:\Temp\dest1" lister="0x19076c" side="2" tab="0x42095c" tab_state="2">C:\Temp\dest1</path>
	<path active_lister="1" display_path="C:\Temp\dest2" lister="0x19076c" side="2" tab="0x37053a">C:\Temp\dest2</path>
	<path active_lister="1" display_path="C:\Temp\dest3" lister="0x19076c" side="2" tab="0x2c0530">C:\Temp\dest3</path>
</results>

At first this looked like exactly what I needed... What does side="1"/side="2" refer to? The tests I caried out with the above lister, tells me its not anything to do with Source/Destination, am I wrong here?

I hope there is way forward here, thanks for any help.

Left and right.

Look further along the lines and the two active tabs have tab_state="1" and tab_state="2" for the source and destination, respectively.

1 Like

Perfect that does it. While we are at it, just one last question I wish to run by you.

What does active_tab="1" / active_tab="2" refer to? At first I thought, this was an index indicator for the current tabs position, when counting from left. But further tests tell me this is not so.

As always, your timely help, really makes Opus what it is.

This thread has useful info on the xml attributes:

1 Like

Wonderfull, thanks Leo

1 Like