Try
function OnClick(clickData) {
var cmd = clickData.func.command;
var tab = clickData.func.sourcetab;
var fsu = DOpus.FSUtil();
cmd.deselect = false;
var archivePath = String(tab.path).replace(/(.*\.)(zip|7z|rar|iso)\\?.*/i, '$1$2');
var targetPath = fsu.NewPath(archivePath).Parent();
cmd.RunCommand('COPY EXTRACT=sub FILE="' + archivePath + '" TO="' + targetPath + '"');
}
Button as XML
<?xml version="1.0"?>
<button backcol="none" display="both" label_pos="right" textcol="none">
<label>37666</label>
<icon1>#newcommand</icon1>
<function type="script">
<instruction>@script JScript</instruction>
<instruction>function OnClick(clickData) {</instruction>
<instruction> var cmd = clickData.func.command;</instruction>
<instruction> var tab = clickData.func.sourcetab;</instruction>
<instruction> var fsu = DOpus.FSUtil();</instruction>
<instruction> cmd.deselect = false;</instruction>
<instruction />
<instruction> var archivePath = String(tab.path).replace(/(.*\.)(zip|7z|rar|iso)\\?.*/i, '$1$2');</instruction>
<instruction> var targetPath = fsu.NewPath(archivePath).Parent();</instruction>
<instruction> cmd.RunCommand('COPY EXTRACT=sub FILE="' + archivePath + '" TO="' + targetPath + '"');</instruction>
<instruction>}</instruction>
</function>
</button>