Re: How to include a double quote in an argument
- From: "Michael Harris \(MVP\)" <mikhar at mvps dot org>
- Date: Fri, 9 Dec 2005 21:22:15 -0800
> I'm trying to pass a named argument that includes spaces and double
> quotes in the argument itself in a wsf script. Since the argument
> contains spaces, I have to enclose it in double quotes. I tried
> doubling up the double quotes, but it didn't work.
> I tried this:
> "echo ""wc -l F9999.txt > F999audit.txt "" "
> The argument was stripped of all quotes when assigned to a variable:
> sCommandTxt = colNamedArgs.Item("C")
> How do I keep the quotes?
Not posible - w/cscript host parsing of script arguments and population of
the Arguments (or .Named or .Unnamed) collections does not preserve the
enclosing quotes and no syntax for escaping them when passed is supported,
Microsoft MVP Scripting
- Prev by Date: Re: newbie: string handling question
- Next by Date: Re: newbie: how to show a folder's acl
- Previous by thread: newbie: how to show a folder's acl
- Next by thread: Re: How to include a double quote in an argument