Previous comment on using quotation marks: https://community.jmp.com/t5/Discussions/Unable-to-parse-speechmarks-quot-quot-into-powershell-using...
You can use a CMD window (the black DOS box window) to see how windows wants the command done with quotation marks:
Use quotation marks around parameters with embedded spaces
Once you have that working, you need to bring it in to a JMP string, which requires some sort of escaping since JMP also uses quotation marks. For this example, just escape the two quotation marks using \!"
filename = "c:\Program Files\Common Files\System\Ole DB\oledbjvs.inc";
write("filename = ", filename); // no quotation marks
txt = runprogram(executable("python"), options({
"\!"" || filename || "\!""
}),readfunction("text"));
Use the "write" function in JMP, not the "print" function which adds more confusion by wrapping the printed text with quotation marks.
You could also build the quotation marks into the string, but the JSL above is what you need if you get the filename from something like the filesInDirectory function...you still need to add them. You can add quotation marks even if they are not needed. See the link at the top if you have quotation marks in the middle of the file name for some reason.
Craige