GP SoftwareTwitter
Opus FAQsManualCommandsObjects

Select only the same files

Is there a way in DOpus to select only those files that exist in both listers?

Example:

Lister 1 Lister 2:

File1.txt File1.txt
File2.txt File4.txt
File3.txt File5.txt

In this example only File1.txt would be selected because it is listed in both listers.

Hope you understood me...

The Select SOURCETODEST command does what you want. Here it is in a button form for pasting on to your toolbar (see the FAQ on what to do with the XML if you don't know already).

<?xml version="1.0"?> <button display="both"> <label>Select Source to Dest</label> <icon1>194</icon1> <function type="normal"> <instruction>Select SOURCETODEST</instruction> </function> </button>

[quote="veggen"]Is there a way in DOpus to select only those files that exist in both listers?

Example:

Lister 1 Lister 2:

File1.txt File1.txt
File2.txt File4.txt
File3.txt File5.txt

In this example only File1.txt would be selected because it is listed in both listers.

Hope you understood me...[/quote]

I use a key with two code for this aim. One code is triggered with right-click, another with left-click

The following code select the same files & folders with a look at destination lister:

Select ALL Select SOURCETODEST DESELECTNOMATCH Select DESTTOSOURCE DESELECTNOMATCH dopusrt /cmd Set SOURCE=Toggle dopusrt /cmd Select NONE dopusrt /cmd Set SOURCE=Toggle

The following code is the previous code in reverse (select those files & folders that are not presented in destination lister):

Select ALL Select SOURCETODEST DESELECTNOMATCH Select DESTTOSOURCE DESELECTNOMATCH Select INVERT dopusrt /cmd Set SOURCE=Toggle dopusrt /cmd Select NONE dopusrt /cmd Set SOURCE=Toggle

Thank you both for the tip!
That was exactly what I was looking for!

After DOpus_v9.1.3.0, there is a new bug that DOpus will crashed every time you use my code on this page.

Now you can use the following code for solving this problem. I used it for a while without and no problem was appeared to now.

<?xml version="1.0"?> <button backcol="#ec042d" display="label" separate="yes" textcol="#ffffff" type="three_button"> <label>SyncSelect</label> <icon1>#newcommand</icon1> <button backcol="none" display="label" textcol="none"> <label>SyncSelect</label> <tip>Select all files/folders that are presented in Source, but are not presented in destination</tip> <icon1>#newcommand</icon1> <function type="normal"> <instruction>Select ALL </instruction> <instruction>Select SOURCETODEST DESELECTNOMATCH </instruction> <instruction>Select DESTTOSOURCE DESELECTNOMATCH </instruction> <instruction>Select INVERT MAKEVISIBLE </instruction> <instruction>dopusrt /cmd Set SOURCE=Toggle </instruction> <instruction>dopusrt /cmd Go REFRESH </instruction> <instruction>dopusrt /cmd Set SOURCE=Toggle</instruction> </function> </button> <button backcol="none" display="label" textcol="none"> <label>SameSelect</label> <tip>Select all files/folders that have similar names in Source and Sestination</tip> <icon1>#newcommand</icon1> <function type="normal"> <instruction>Select ALL </instruction> <instruction>Select SOURCETODEST DESELECTNOMATCH MAKEVISIBLE </instruction> <instruction>Select DESTTOSOURCE DESELECTNOMATCH MAKEVISIBLE </instruction> <instruction>dopusrt /cmd Set SOURCE=Toggle </instruction> <instruction>dopusrt /cmd Go REFRESH </instruction> <instruction>dopusrt /cmd Set SOURCE=Toggle</instruction> </function> </button> </button>

I appreciate greatly that you shared the updated version, but I don't really know how to use it... Where am I supposed to copy the code?

Thanks for the patience...

See the FAQ on how to use example buttons from the forums.

But you don't have to do anything if you install Opus 9.5.0.1 as the cause of the original problem is fixed.

Oh, sorry, I realized what needs to be done but there's no way to delete or edit the post... Thanks again and sorry for the mess.