in reply to Re^7: quoting issue with system command (Win32)
in thread quoting issue with system command
In stdargv.c,
A quoted program name is handled here. The handling is much simpler than for other arguments. Basically, whatever lies between the leading double-quote and next one, or a terminal null character is simply accepted. Fancier handling is not required because the program name must be a legal NTFS/HPFS file name.and then
Note that the double-quote characters are not copied, nor do they contribute to numchars.
Rules: 2N backslashes + " ==> N backslashes and begin/end quoteThis means that if the EXE file name does have a 0x22 (QUOTATION MARK) in it, it won't parse out the argv/argc properly. Contrary to the comment, you can have a file by this name, and there are other file systems besides NTFS. Not using [<>:"/\|?*] in a file name on any filesystem is a Win32 convention, not a file system limitation.
2N+1 backslashes + " ==> N backslashes + literal "
N backslashes ==> N backslashes
|
|---|