Script log.
powershell D:\_DOCUMENTS\Scripts\source\makefiles.ps1 '"I:\aaa\filewith'symbol.zip"'
And button code, I took from solution post here.
function OnClick(clickData)
{
var cmdLine = 'powershell D:\\_DOCUMENTS\\Scripts\\source\\makefiles.ps1'
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
}
If I grab output and insert into CMD.
Code with files without quotes, will run fine.
If there is quote.
The string is missing the terminator: '.
+ CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : TerminatorExpectedAtEndOfString
I'm even leaning into bulk renaming to make files be without odd symbols.