Compare Directories with only partial names/pattern matching (Files converting)

Hi

I use different tools to convert files. Sometimes these tools end up with errors or crash, or maybe overjump some single files because errors. Some conversions need mutch time, maybe they crash, so just starting new isn't really an option.

I would like to use a compare in 2 Listers (source/dest) witch shows me what have been done and what needs a second try.

Examples:

file1.JPG gets converted to file1.PNG
file2.DWG gets converted to file2.SVG
or
file3.jpg gets converted to file3XYZ.jpg
file4.gif gets converted to file4XYZ.psd

now i need a type of "variable FILENAME compare" where i can define patterns what FOR ME means "SAME" even Names are different.
eg. if file1.JPG + file2.JPG exist left side and file1.PNG + file2.PNG right side then it is "synchronous" (convert job done, all fine)

or

if file3.jpg + file4.jpg exists left side and file3XYZ.jpg + file4XYZ.jpg exists right side
then the listers are "synchronous"

Has anyone an idea how i can do this?

You could use Select to find all files that have proper matches and display the ones that do not, e.g.:

Select NONE
Select DESTTOSOURCE=in,noext
Select FILTERDEF =Exists({destpath} + Stem(file_name) + "XYZ" + FileExt(file_name))
Select INVERT SETFOCUS
Select SHOWFOCUS

How to use buttons and scripts from this forum

Thank you for your answer.

if i make a button and try that, the script-handler does "something", but ends in an error
also not selecting something useful. (Error in line 1 position 8)
I tried to set on/off evaluation mode but not changed something.
Do you maybe have an aditional hint?

15.05.24 17:18 Evaluator: Fehler in Zeile 1, Position 8
Unbekannter Wert (6): B
Exists(B:_BACKUPS\ + Stem(file_name) + "XYZ" + FileExt(file_name))

How about something like this:

Unique Files in Each Pane Toggle.dcf (930 Bytes)

1 Like

there's a similar script, "hide itentical names":

function OnClick(clickData)
{
	var cmdSource = clickData.func.command;
	cmdSource.ClearFiles();

	var cmdDest = DOpus.create.command;
	cmdDest.SetSourceTab(clickData.func.desttab);

	cmdSource.RunCommand("Select DESELECTNOMATCH SOURCETODEST=in");
	cmdDest.RunCommand("Select DESELECTNOMATCH SOURCETODEST=in");
	cmdSource.RunCommand("Select NOPATTERN HIDESEL");
	cmdDest.RunCommand("Select NOPATTERN HIDESEL");
}

and second for restore:

function OnClick(clickData)
{
	var cmdSource = clickData.func.command;
	cmdSource.ClearFiles();

	var cmdDest = DOpus.create.command;
	cmdDest.SetSourceTab(clickData.func.desttab);

	cmdSource.RunCommand("Select NOPATTERN SHOWHIDDEN");
	cmdDest.RunCommand("Select NOPATTERN SHOWHIDDEN");
}

P.S.
and of course there's an old CompareTabs

Difficult to say... the button worked fine here with your sample files.