There's no way to force quotes around {allfilepath}
, only for the codes that emit a single path/name at a time.
With sep=x
, the x
can only be one character as well. (That was added for a program that needed *
between paths.)
It's unusual for a program to require quotes around paths that don't contain spaces. This seems like a PotPlayer issue to me, more than anything. I'd be surprised if many other programs needed the same thing.
Using scripting is a good workaround for that kind of thing. I would use a simpler script in the button itself (no script add-in):
function OnClick(clickData)
{
var cmdLine = '"C:\\Program Files\\DAUM\\PotPlayer\\PotPlayerMini64.exe"'
var selected = clickData.func.sourcetab.selected;
// if (selected.count == 0) return; -- to block launching the program with no paths
for (var eSel = new Enumerator(selected); !eSel.atEnd(); eSel.moveNext())
{
// if (eSel.item().is_dir) continue; -- if you want to skip dirs
cmdLine += ' "';
cmdLine += eSel.item().RealPath;
cmdLine += '"';
}
var cmd = clickData.func.command;
cmd.ClearFiles();
cmd.RunCommand(cmdLine);
// DOpus.Output(cmdLine); -- for testing
}