Re: Command() and cmd ("Dos") vs Run menu (WinXP)

From: Rick Rothstein (rickNOSPAMnews_at_NOSPAMcomcast.net)
Date: 12/16/04


Date: Thu, 16 Dec 2004 14:22:37 -0500


> I took a look at the "old" Dos commands and discovered that using
quotes as
> the delimiter is not a standard.
> Sometimes it uses a space ( uses double quotes to make it ignore the
> spaces ) or a + as delimiter.
> Is there some standaard or definition what's the best delimiter to
use.

As Bob said, not really. Not using quotes kind of dates back to before
the time of long filenames. The old 8.3 file naming standard did not
permit embedded spaces, so spaces could be used as delimiters without
confusion. When long file names were introduced, the recommendation was
to use quote marks around them to protect the spaces from DOS
interpreting them as delimiters. The plus sign, as well as the minus
sign standard, are used so that these specific characters can be
searched for (using the InStr function) when parsing a command line.
This allows for arguments with spaces and no surrounding quotes;
arguments were what occurred from one plus or minus sign to the next one
(or to the end of the string). Very often, the sign is followed by one
or more fixed characters in order to allow for different kinds of
arguments.

Rick - MVP



Relevant Pages