Try this. You might need to adjust the hotkey.
// https://resource.dopus.com/t/is-it-possible-to-enter-a-command-and-have-2-panes-update/40657
function OnClick(clickData) {
var cmd = clickData.func.command;
var dlg = clickData.func.Dlg();
var fsu = DOpus.FSUtil();
cmd.deselect = false;
var st = dlg.GetString('Folder to open:', st);
if (typeof st != 'string') return;
var leftStartfolder = 'C:\\Unreviewed';
var rightStartfolder = 'C:\\Reviewed';
var folderEnum = fsu.ReadDir(leftStartfolder, 'r');
while (!folderEnum.complete) {
var item = folderEnum.Next();
if (!item.is_dir) continue;
if (String(item.realpath).indexOf(st) < 0) continue;
cmd.RunCommand('GO PATH="' + item + '" NEWTAB OPENINLEFT');
}
folderEnum.Close();
var folderEnum = fsu.ReadDir(rightStartfolder, 'r');
while (!folderEnum.complete) {
var item = folderEnum.Next();
if (!item.is_dir) continue;
if (String(item.realpath).indexOf(st) < 0) continue;
cmd.RunCommand('GO PATH="' + item + '" NEWTAB OPENINRIGHT');
}
folderEnum.Close();
}
Button as XML
<?xml version="1.0"?>
<button backcol="none" display="both" hotkey="/" textcol="none">
<label>40657</label>
<icon1>#newcommand</icon1>
<function type="script">
<instruction>@script JScript</instruction>
<instruction>// https://resource.dopus.com/t/is-it-possible-to-enter-a-command-and-have-2-panes-update/40657</instruction>
<instruction />
<instruction>function OnClick(clickData) {</instruction>
<instruction> var cmd = clickData.func.command;</instruction>
<instruction> var dlg = clickData.func.Dlg();</instruction>
<instruction> var fsu = DOpus.FSUtil();</instruction>
<instruction> cmd.deselect = false;</instruction>
<instruction />
<instruction> var st = dlg.GetString('Folder to open:', st);</instruction>
<instruction> if (typeof st != 'string') return;</instruction>
<instruction />
<instruction> var leftStartfolder = 'C:\\Unreviewed';</instruction>
<instruction> var rightStartfolder = 'C:\\Reviewed';</instruction>
<instruction />
<instruction> var folderEnum = fsu.ReadDir(leftStartfolder, 'r');</instruction>
<instruction> while (!folderEnum.complete) {</instruction>
<instruction> var item = folderEnum.Next();</instruction>
<instruction> if (!item.is_dir) continue;</instruction>
<instruction> if (String(item.realpath).indexOf(st) < 0) continue;</instruction>
<instruction> cmd.RunCommand('GO PATH="' + item + '" NEWTAB OPENINLEFT');</instruction>
<instruction> }</instruction>
<instruction> folderEnum.Close();</instruction>
<instruction />
<instruction> var folderEnum = fsu.ReadDir(rightStartfolder, 'r');</instruction>
<instruction> while (!folderEnum.complete) {</instruction>
<instruction> var item = folderEnum.Next();</instruction>
<instruction> if (!item.is_dir) continue;</instruction>
<instruction> if (String(item.realpath).indexOf(st) < 0) continue;</instruction>
<instruction> cmd.RunCommand('GO PATH="' + item + '" NEWTAB OPENINRIGHT');</instruction>
<instruction> }</instruction>
<instruction> folderEnum.Close();</instruction>
<instruction>}</instruction>
</function>
</button>