Extract archives with condition?

I haven't tried this with these particular commands, but you might be able to get simple error checking by adding the copy and delete via cmd.AddLine, then running them as a single command via cmd.Run. If the copy fails, the delete shouldn't happen.

But I'd still be careful using a button like that, as "fail" means the command had to be aborted entirely, which will exclude cases where, say, you accidentally click Skip All when you meant to click Replace or Abort, and then nothing is extracted and the archive is deleted... Or antivirus might see a new file and tell you it deleted it, and then the archive also gets deleted...

I much prefer to do the two steps separately, making the extraction leave the archives selected (which lxp's script already does) so I can then click Delete afterwards when/if that's what I want, while staying in full control of what happens, for just one extra click.