Monday, February 11, 2008

popen, Windows, and quotes

Turns out that this won't work very well on Windows:

popen("\"C:\\some dir\\some_file.exe\" \"input file\"");
But this will:

popen("\"\"C:\\some dir\\some_file.exe\" \"input file\"\"");
Those coming from Unix-land would think the second example has one too many quotes; here's more info.

No comments:

Post a Comment

Post a Comment