Mail Archives: djgpp/2004/09/30/08:15:43
Vyom <vyom2k4 AT yahoo DOT com> wrote:
> I have a question regarding chdir() function,
> If the file name contains a space, how should the argument
> be passed to chdir function?
Just as it is. No extra quoting or anything:
> I tried including quotes like
> chdir ("d:\\\"\program files"");
chdir ("d:\\program files");
or, if you hate typing any more backslashes than strictly needed
chdir ("d:/program files");
Spaces are not a problem for C programs, which would have to be
treated specially. They are a problem only for the command line shell
(command.com, cmd.exe), because that would normally assume spaces to
separate arguments.
> Also is there any difference in running the program in
> cmd.exe and command.com.
Not as far as this aspect concerned.
--
Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de)
Even if all the snow were burnt, ashes would remain.
- Raw text -