X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f From: Hans-Bernhard Broeker Newsgroups: comp.os.msdos.djgpp Subject: Re: About chdir() Date: 30 Sep 2004 11:32:39 GMT Lines: 30 Message-ID: <2s296mF1fic9vU1@uni-berlin.de> References: X-Trace: news.uni-berlin.de OcnOcya30IdP42weuAEsjgKYNyIUTwxBh2iE09DJxXu1w+t5d0N/8t9zvA X-Orig-Path: not-for-mail To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Vyom 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 hat 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.