Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

WScript.Arguments won't parse double-quotes within arguments

929 views
Skip to first unread message

mingfai

unread,
Mar 20, 2001, 11:24:15 PM3/20/01
to
hi,

i have problems getting my arguments containing the double-quote properly
parsed into WScript.Arguments.

e.g. wscript myscript.vbs ab"cd

WScript.Arguments(0) returns abcd

i've tried using '/' before the argument, or using 2 double-quotes to
represent one (as in VB), but still no luck.

please advise! thanks.

mingfai


Michael Harris

unread,
Mar 21, 2001, 1:44:13 AM3/21/01
to
You can't pass arguments that contain double quotes as arguments to a WSH hosted script. This is an
unavoidable limitation due to the command line parsing in the host EXEs (wscript/cscript).

You can use single quotes in the arguments that you replace within the script with double quotes or
whatever hack you find more palatable ;-)...

--
Michael Harris
Microsoft.MVP.Scripting
--
mik...@mvps.org
Please do not email questions - post them to the newsgroup instead.
--

"mingfai" <mingfai...@yahoo.com> wrote in message news:OXM#hTZsAHA.1552@tkmsftngp04...

0 new messages