httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Hyde <>
Subject Re: NT: spaces in paths
Date Wed, 22 Oct 1997 11:38:58 GMT

My experiance of moving to the NT seems analagous to that of an
emigrant in a new country.  I keep looking for the foods, spices, and
church rituals so common in my other homes.  Of course I know that if
I choose to live in a Unix like getto I'll never be a First Class

One spice I'd hoped to find was doc ... on how command.exe parses
arguments.  The following (written by another emigrant) is the closest
I've come upon.  This is taken from the README.win32 found when you
unpack Perl for the NT.

My take from this is that the natives pick apart the command line
string each in his own unique way.  It explains a lot.  - ben h.

=item Using perl from the command line

If you are accustomed to using perl from various command-line
shells found in UNIX environments, you will be less than pleased
with what Windows NT offers by way of a command shell.

The crucial thing to understand about the "cmd" shell (which is
the default on Windows NT) is that it does not do any wildcard
expansions of command-line arguments (so wildcards need not be
quoted).  It also provides only rudimentary quoting.  The only
(useful) quote character is the double quote (").  It can be used to
protect spaces in arguments and other special characters.  The
Windows NT documentation has almost no description of how the
quoting rules are implemented, but here are some general observations
based on experiments:  The shell breaks arguments at spaces and
passes them to programs in argc/argv.  Doublequotes can be used
to prevent arguments with spaces in them from being split up.
You can put a double quote in an argument by escaping it with
a backslash and enclosing the whole argument within double quotes.
The backslash and the pair of double quotes surrounding the
argument will be stripped by the shell.

The file redirection characters "<", ">", and "|" cannot be quoted
by double quotes (there are probably more such).  Single quotes
will protect those three file redirection characters, but the
single quotes don't get stripped by the shell (just to make this
type of quoting completely useless).  The caret "^" has also
been observed to behave as a quoting character (and doesn't get
stripped by the shell also).

hint dejour: regedit (but not regedit32) lets you dump the entire registry
to a file which you can then run unix tools on.

View raw message