From mboxrd@z Thu Jan 1 00:00:00 1970 From: Benjamin Riefenstahl To: Fabio Vignoli Cc: Jan-Jaap van der Heijden , GNU-Win32 list , Colin Peters Subject: Re: Problems with mingw32 GCC 2.8.0 !!! Date: Thu, 29 Jan 1998 04:47:00 -0000 Message-id: <34D05948.183037BA@crocodial.de> References: X-SW-Source: 1998-01/msg00715.html Fabio Vignoli wrote: > Just to joke: > try in a MSDOS shell on windows NT : cd Program Files (it works) > cd "Program Files" (it works) > dir Program Files (DOES NOT WORK!!!) > dir "Program Files" (it works) > Does anybody can tell me why? ;-) If I had to guess I'd say it's just programmer's laziness and probably backwards compatibility afterwards. You have to remember that in DOS/Windows the command line is not parsed by the shell but by the programs themselfs. That makes for a lot of inconsistencies between applications and commands and seemingly even between command.com built-ins. The story probably was: The cd command has no options (or at least it didn't use to), so the programmer of command.com did not bother to parse the command line, he just took it and used it as a whole. In later versions he added code to strip the quotes for compatibility with other commands but he didn't use the full command-line parser, because that might not have been backwards compatible with the use of the cd command in older batch scripts. The dir command OTOH has a lot of options, so the command line *has* to be parsed and after parsing Program Files becomes two arguments. All just guesswork, of course ;-) ====================================== Benjamin Riefenstahl (benny@crocodial.de) Crocodial Communications EntwicklungsGmbH Ophagen 16a, D-20257 Hamburg, Germany - For help on using this list (especially unsubscribing), send a message to "gnu-win32-request@cygnus.com" with one line of text: "help".