If I say "yes" a file called "x.txt y.txt" is created.
According to the help file, this is the behaviour I would expect if I were using the "-u" switch.
In Unix/Linux you can use almost any ASCII character in a file or directory name. The difference is that Unix/Linux people, being command-line aware, have enough sense not to do that.
C:\Users\JE\Desktop\Test dir> a.exe x y
[a.exe] [x] [y]
C:\Users\JE\Desktop\Test dir> "C:\Users\JE\Desktop\Test dir"\a.exe x y
[C:\Users\JE\Desktop\Test dir\a.exe] [x] [y]
C:\Users\JE\Desktop\Test dir> "C:\Users\JE\Desktop\Test dir\a.exe" x y
[C:\Users\JE\Desktop\Test dir\a.exe] [x] [y]
I made sure to use a directory with a space in the name. Notice that the output for the second and third cases are the same, despite the difference in quoting.
C:\Users\JE\Desktop\Test dir> a.exe x y
[a.exe] [x] [y]
C:\Users\JE\Desktop\Test dir> "C:\Users\JE\Desktop\Test dir"\a.exe x y
[C:\Users\JE\Desktop\Test dir\a.exe] [x] [y]
C:\Users\JE\Desktop\Test dir> "C:\Users\JE\Desktop\Test dir\a.exe" x y
[C:\Users\JE\Desktop\Test dir\a.exe] [x] [y]
I made sure to use a directory with a space in the name. Notice that the output for the second and third cases are the same, despite the difference in quoting.
C:\Users\JE\Desktop\Test dir> a.exe x y
(a.exe) (x) (y)
C:\Users\JE\Desktop\Test dir> "C:\Users\JE\Desktop\Test dir"\a.exe x y
(C:\Users\JE\Desktop\Test dir\a.exe) (x) (y)
C:\Users\JE\Desktop\Test dir> "C:\Users\JE\Desktop\Test dir\a.exe" x y
(C:\Users\JE\Desktop\Test dir\a.exe) (x) (y)
I made sure to use a directory with a space in the name. Notice that the output for the second and third cases are the same, despite the difference in quoting.
So it definitely is NOT a bug in CMD/4NT/TCMD.[/b]
Couldn't get mail server response codes
DEBUG MODE
Line : 185
File : smtp.php
which I thought might be due to square brackets in my test program and output, so I tried again with parentheses... it posted successfully both times despite the error message.
I use TCC (v 20), which succeded 4NT many years ago. It works as I described in my installation of TCC. (TCMD is not relevant here.)
Your C program shows that by the time the command line has been processed by the parser of your version of 4NT and your version of C run-time library, the quotes have gone.
Strictly speaking each program on its own can decide how to treat its command line. Most programs adhere to the space being a parameter delimiter (unless quotes are used), but there's no guarantee for you.