How do I select the content extracted with Copy EXTRACT?

	cmd.AddLine("Copy EXTRACT=sub HERE");
	cmd.AddLine("Delete");
	cmd.Run();

If I extract an archive like this, how can I select the created directories in the source tab?

What are you aiming to do with them after selection?

Having them selected in the source tab.

They won't normally be in the source tab if you've extracted them into a sub-folder (EXTRACT=sub in your command), unless you mean you want to select that folder? (Or you're using Flat View or something?)

That folder, or folders if I had multiple archives selected.

The tab object has an update method which will make it check for new files/folders. You can then select the folder based on the name of the archive. (I think the name is also given to you in the command’s results property, too, but could be wrong.)

Could you help me on that? I'm not that good with scripting ^^'
How do I read the commands result?
I do two commands in one go, cause I want it to not delete the archive if the extraction fails. Could I do the first one and check in the result if it failed?

Now I'm back at my PC, it looks like the Command.Results object doesn't have the information I thought it had. I was confusing it with some other things.

This seems to work, though, without needing anything complicated:

function OnClick(clickData)
{
	var cmd = clickData.func.command;
	cmd.AddLine('Copy EXTRACT=sub HERE');
	cmd.AddLine('Delete');
	cmd.AddLine('Select EXACT PATTERN={file|noext}');
	cmd.Run();
}

I like uncomplicated, but it selects more than it should.
Can you explain what EXACT PATTERN does? Where does it get file from?

What is being selected?

https://www.gpsoft.com.au/help/opus12/index.html#!Documents/Select.htm

I know that site, but I don't get it :smiley:

230403_0006_dopus

Now it does that. I had it select both, the output folder and the one below it before.