Search code examples
haskellshellexecute

How to handle spaces with System.Process (system)


If I want to execute some string that contains another path with spaces (I can pass it alike "\"C:/Program Files (x86)/G...) system by default ignores quotes and shows error about "C:/Program"

Is there other quotes or I should replace space with some another symbol there?


Solution

  • Try rawSystem instead. It requires you to split the arguments in a list of strings, but at least you should not have any issues with spaces and escaping special characters.