Aurel,
The code you typed in red may not work in some compilers or interpreters. That depends on their ability to accept enquoted filenames/filepaths in order to describe some of them that would have spaces. The compiler or interpreter will see the expression
chr(34) + fName + chr(34)in its shelled command line as literal
"filename.ext"or generally
"diskname:\path name\file name.ext"The variant typed in blue would be much safer
unless fName is a filename and/or filepath with spaces in it, like e.g. in
C:\Program Files\someprog.exe. But it would certainly fail as well if
fName contains at least one space.
OTOH even your
"-c" + fNamemight not work either just because you missed a space after
-c before concatenation. It should've been
"-c " + fNameelse many more Windows-oriented interpreters and compilers won't be able to tell where the
-c directive ends and the
fName value starts. Concatenated unspaced options are typical under Linux but look totally out of place under MS Windows.
...
(& I always start with the idea that it is me who made the mistake)
...
I think that's what all of us should do too.