Extending the functionality of the "Restore All" button in the trash view

I need to extend the functionality of the “Restore All” button in the trash view.I have multiple mail files with a LOT of documents in the trash view.

I’m trying to replicate them to new servers but have soft deletion enabled.

I can not let the items in the “Trash” view get deleted at this time.

What I would like to do is copy “Restore All” and call it “Restore All to a Folder”

The part I need help with is how do I get the button to:

  1. create a folder called “To Be Deleted”

  2. Restore All documents in the trash view into the newly created folder.

Then I can replicate the mail files with the documents intact. and have a central folder where I can “Ctrl-A”, “Del” When the lawyers say I can delete.