Select unmatched files

Hi,

I have 2 folders, folder1 (called JPEG) and folder2 (called RAW)
I want to select all files in folder2 that have no equivalent (same name but different extension) in folder1.

For exemple:
folder1 (JPEG) contains
pic1.jpg
pic2.jpg
pic4.jpg

folder2 (RAW) contains
pic1.raw
pic2.raw
pic3.raw
pic4.raw
pic5.raw
pic6.raw

I want the following files selected in folder2:
pic3.raw
pic5.raw
pic6.raw

I thought I could achieve this result with the following steps in a button:
With folder1 JPEG being the source and folder2 RAW the destination
#1) select everything in the source folder
select ALLFILES

#2) select all files in destination that have a file with the same name (no matter extension) in destination
set STATE=Dest
select pattern={od!|ext=*}

#3) invert the selection
select invert

In fact, the step 2) fails, it presents me a dialog box asking for a pattern...

Any idea?

Check out this thread. Younds pretty much like the thing you' re looking for.

Hi, thanks for the link.

The problem is quite similar, except that in my case, I have jpegs and raws in 2 different folders, set as the source and the destination.

The difficulty I'm facing is to select files in 1 folder filtered by a pattern applied on the other folder.

Here's one way that seems to work. It's rather crude and I'm sure it can be refined/improved but I have to head off to work now so I'll throw out what I have so far. By the way I tested this with a dual lister.

First filter the destination so only the raw files are visible. I did that with the following command to only show Canon CR2 raw files.

Set SHOWFILTERFILENAME *.cr2

Next create a button and paste the following into it.

@nofilenamequoting @nodeselect dopusrt /cmd Set SOURCE=Toggle dopusrt /cmd Select NONE dopusrt /cmd Select PATTERN "{file$|noext}.*" dopusrt /cmd Select INVERT TYPE=files

Then with the source active select the files you want and click the button.

OK, thanks a lot, it does exactly what I want.

But I still have some questions/remarks:

  1. With the commands you gave, I have an unexpected crash of Dopus!
    I replaced
    dopusrt /cmd Select PATTERN "{file$|noext}."
    with
    dopusrt /cmd Select PATTERN="{file$|noext}.
    "
    and everything goes right...

  2. Why do I need to use dopusrt /cmd ..., isn't it the same if I directly use Select... in my Button?
    Actualy, I tried, and it doesn't work.. What is the difference?

  3. The concepts of "source/destination" and "active/inactive" are not the same?
    What I understand is that clicking in a lister makes it active, and makes it the source too, but using the command Set, you can independantly set a lister to be the source and to be inactive, or to be active and being the destination, is that right?

  4. Why is the process so long?
    I thought it could be faster, but it takes a few seconds to scan 10 files...

[quote="ymerdy"]But I still have some questions/remarks:

  1. With the commands you gave, I have an unexpected crash of Dopus!
    I replaced
    dopusrt /cmd Select PATTERN "{file$|noext}."
    with
    dopusrt /cmd Select PATTERN="{file$|noext}.
    "
    and everything goes right...[/quote]

It didn't cause a crash for me, but nevertheless you might want to report it to GPSoft.

[quote="ymerdy"]2) Why do I need to use dopusrt /cmd ..., isn't it the same if I directly use Select... in my Button?
Actualy, I tried, and it doesn't work.. What is the difference?[/quote]

If the following command...

@nofilenamequoting Select PATTERN="{file$|noext}.*" SOURCETODEST

would have worked as I expected it to, we may not have needed dopusrt. However it doesn't seem to select destination files that match the selected files in the source regardless of the destination file extensions, so I turned to using the external Opus command processor dopusrt which does. It doesn't happen as often as it used to with older versions of Opus, but sometimes the only way to get a certain command combination to work is to use dopusrt /cmd instead of using the internal command set. Normally dopusrt /cmd is a way you can use Opus commands in an external script, for example a batch file.

[quote="ymerdy"]3) The concepts of "source/destination" and "active/inactive" are not the same?
What I understand is that clicking in a lister makes it active, and makes it the source too, but using the command Set, you can independantly set a lister to be the source and to be inactive, or to be active and being the destination, is that right?[/quote]

Yes, you're right. I was in a bit of a hurry this morning and didn't choose my words very well.

[quote="ymerdy"]4) Why is the process so long?
I thought it could be faster, but it takes a few seconds to scan 10 files...[/quote]

Partly because we're not using the internal commands, which I think are processed faster, but other than that I cannot answer this question.

OK,

thank you for your solution, your answers and the time you spent on this thread!