REQ: Extract and Delete to Recycle Bin upon successful extraction

Hi, I keep trying to write a custom user command script but I've failed every time. I've tried writing it myself, I've tried using various different AIs to assist with writing this script, and everything has led to failure and errors.

Can somebody write me a script that will extract the selected files to the currently active lister without a subfolder being created, and upon successful extraction, the zip/7z/rar files (including any associated multipart archives) will be deleted to the recycle bin?

That means that, if I select a file, it will be extracted to the currently active lister and then the zip/7z/rars will be deleted to the recycle bin upon successful extraction.

If I drag the zip file to another lister and then use the custom extract script, it will extract the file to that lister and then delete the zip/7z/rar files to recycle bin upon successful extraction.

I would prefer for this to be written in JSCRIPT, as that seems to be most flexible, but at this point I'm desperate and will accept literally anything if it works.

Also, if this seems like it can only be done by using the 7-zip executable, or if it would just be plain easier to use 7-zip, then I will gladly take a script that can utilize 7-zip. :slight_smile:

Any help would be greatly appreciated.

Simplest way:

@nofilenamequoting
Copy EXTRACT
Delete "{filepath|noext}.*"

But I am not sure how good the error checking will be with that. The delete pattern may also need adjusting, depending on the type of multi-part archives and how they are named.

For more advanced methods, there are script add-ins which do something similar. Not sure how/if they handle multi-part archives.

(Maybe some others exist, too. Those are the ones I found from a quick look.)

Thank you I look forward to testing these when I get home from work. :slight_smile: