Just a heads up, the #280 command won't work if your archieve is password protected, at-least it doesn't for me with .7z files.
What I ended up doing is calling 7zG.exe to perform extractions, which will allow you to input a password if needed, supports a lot of archive formats, and even shows you a nice little progress bar if you use the right commands.
If you decide you'd like these features, here's the 7z commands I run that will do them. You can incorporate this into your script or use it as-is in a toolbar button, just point the script to where you keep
7zG.exe (download).
Code: Select all
Extract to "*\"|$selected_items = ''; foreach($file, "<selitems ::>", "::") { $selected_items = lax($selected_items -ai!"$file") }; run lax("$PORTABLEAPPS\7-ZipPortable\App\7-Zip64\7zG.exe" x -o".\*\" "-spe" "-an" $selected_items)|
Extract here|$selected_items = ''; foreach($file, "<selitems ::>", "::") { $selected_items = lax($selected_items -ai!"$file") }; run lax("$PORTABLEAPPS\7-ZipPortable\App\7-Zip64\7zG.exe" x -o".\" "-an" $selected_items)|
Since this command loops over the input files, you can extract any number of archives at once. The first option will extract into a folder of the same name and the second will extract into the current folder. I don't have it delete the archives, though I'm pretty sure 7z has a flag that you can add so that it will delete the archive upon successful extraction (just in case something goes wrong)...