in reply to Re^2: quoting issue with system command
in thread quoting issue with system command
The logic of system's argument processing is supposed to make sense on Unix, with underlying OS primitives that work in the same way. But it's a mess on Windows, where the documented meaning is implemented to some degree. Point is, it takes different code paths depending on the form, with different behavior. It's been a while since I looked at it. But if it calls the CMD.exe shell with the whole thing as a string, it behaves the same way as on the command line, as I showed. If it tries to call CreateProcess directly, the exe file name is a separate argument to that."D:\Program Files\foo.exe" arg1 arg2 "file_name with spaces.txt"
I suppose I should refresh my knowledge before writing anything that makes use of that feature myself.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: quoting issue with system command
by lomSpace (Scribe) on May 13, 2009 at 17:46 UTC | |
by ikegami (Patriarch) on May 13, 2009 at 18:14 UTC | |
by John M. Dlugosz (Monsignor) on May 13, 2009 at 20:26 UTC | |
|
Re^4: quoting issue with system command
by lomSpace (Scribe) on May 13, 2009 at 18:04 UTC |