Find defaults to CLEAR=yes

If CLEAR is omitted from the command line, Find will assume it to be CLEAR=yes. If multiple Find commands use the same collection, only the results from the last Find command will be shown.

Explicitly setting CLEAR=no helps:

Find NAME=*.txt COLLNAME=MyFind IN "D:\Demo Find\Folder1"
Find NAME=*.txt COLLNAME=MyFind IN "D:\Demo Find\Folder2"
Find NAME=*.txt COLLNAME=MyFind IN "D:\Demo Find\Folder3"

// Find NAME=*.txt CLEAR=no COLLNAME=MyFind IN "D:\Demo Find\Folder1"
// Find NAME=*.txt CLEAR=no COLLNAME=MyFind IN "D:\Demo Find\Folder2"
// Find NAME=*.txt CLEAR=no COLLNAME=MyFind IN "D:\Demo Find\Folder3"

Demo Folder: Demo Find.7z

Button as XML
<?xml version="1.0"?>
<button backcol="none" display="both" label_pos="right" textcol="none">
	<label>Demo Find CLEAR</label>
	<icon1>#newcommand</icon1>
	<function type="normal">
		<instruction>Find NAME=*.txt COLLNAME=MyFind IN &quot;D:\Demo Find\Folder1&quot;</instruction>
		<instruction>Find NAME=*.txt COLLNAME=MyFind IN &quot;D:\Demo Find\Folder2&quot;</instruction>
		<instruction>Find NAME=*.txt COLLNAME=MyFind IN &quot;D:\Demo Find\Folder3&quot;</instruction>
		<instruction />
		<instruction>// Find NAME=*.txt CLEAR=no COLLNAME=MyFind IN &quot;D:\Demo Find\Folder1&quot;</instruction>
		<instruction>// Find NAME=*.txt CLEAR=no COLLNAME=MyFind IN &quot;D:\Demo Find\Folder2&quot;</instruction>
		<instruction>// Find NAME=*.txt CLEAR=no COLLNAME=MyFind IN &quot;D:\Demo Find\Folder3&quot;</instruction>
	</function>
</button>

(Or is this the new default? 13.0.24 already showed this behavior.)

Opus 12 was the same. I think it makes sense. It's rare to went to add the results of one find to another, and can be confusing/misleading if it's done by accident, so you have to explicitly ask for that on the command.

If I remember correctly, a long time ago it may have used the setting in the Find panel if it wasn't specified one way or the other on the command, but that meant command behavior depended on the last thing you did in the Find panel, which wasn't great.

(Why is there still a CLEAR=yes? => It should let you override a Preset that was saved the other way around.)

Yes and no :slight_smile:

Yes, my demo performs the same in v12 and v13.

But that is because I simplified it too much:

  • Regular Find instead of Dupefinder
  • Button instead of Script

Opus kept CLEAR=no as default up to at least 13.0.28 (13.0.32 and up default to yes) when the Dupefinder was called from a script.

function OnClick(clickData) {
    var cmd = clickData.func.command;
    var tab = clickData.func.sourcetab;
    var fsu = DOpus.FSUtil();
    cmd.deselect = false;

    cmd.RunCommand('Set UTILITY=otherlog');

    cmd.RunCommand('Find NAME=*.* DUPES MD5=cache COLLNAME=MyDupes IN "D:\\Demo Find\\Folder1"');
    cmd.RunCommand('Find NAME=*.* DUPES MD5=cache COLLNAME=MyDupes IN "D:\\Demo Find\\Folder2"');
    cmd.RunCommand('Find NAME=*.* DUPES MD5=cache COLLNAME=MyDupes IN "D:\\Demo Find\\Folder3"');
}

Find Duplicates in Subfolders is based on this behavior and needs an update for v13.

I think it makes sense.

I agree. Cheers to the new default for all scenarios!

Ah OK, yes the Duplicate Finder command defaults changed during the private betas. Found the 27th September change:

"Find DUPES" command now defaults to "RECURSE CLEAR UAC=no", consistent with the "Find" command (and what's usually wanted). Note that commands which build-up results over multiple duplicate searches will need changing to use "CLEAR=no"; I'm assuming that's a very rare usage.

1 Like