Page 1 of 1

Script fails when spaces in path name

Posted: 20 Nov 2018 04:10
by zBernie
The script below bombs if I run it in a directory that contains spaces. How can I handle spaces in the path name?

$var_file = "<selitems ,>";
runret("D:\Program Files\ImageMagick-7.0.3-Q16\convert.exe $var_file +append merged-horizontal.jpg");

Re: Script fails when spaces in path name

Posted: 20 Nov 2018 07:08
by highend
And since when does convert.exe accept comma-delimited input files?

Code: Select all

    $var_files = get("SelectedItemsPathNames", '" "');
    runret("""D:\Program Files\ImageMagick-7.0.3-Q16\convert.exe"" ""$var_files"" +append merged-horizontal.jpg");

Re: Script fails when spaces in path name

Posted: 20 Nov 2018 16:56
by zBernie
Evidently dealing with a comma separated list of file names will be another issue.

I just want to pass a script file names as arguments, XYPlorer makes that difficult. There are several threads in this forum regarding passing a PowerShell script parameters, which was never resolved.

-Thanks