I am trying to learn how to run external processes from within maya, I am struggling to escape space, I have so far tried:
system("\"C:/my folder/programme.exe\"");
While the above works, the programme does run but as soon as I try to provide a file or arguments to the programme I start to run into issues:
system("'C:/my folder/programme.exe' 'C:/my folder/out.png''");
system('"C:/my folder/programme.exe" "C:/my folder/out.png"');
system("\"C:/my folder/programme.exe\" \"C:/my folder/out.png\"");
system("\"C:/my folder/programme.exe\" \"C:/my folder/out.png\"");
With all the above I get a syntax error. I am not sure where I am going wrong here. ChatGPT keeps telling me to use CMD withing system()
, I would like to avoid this as I am interested in learning how to do this directly with Mel.