Re: Subversion - .wsf hook scripts on Windows
From: Andy Levy <andy.levy_at_gmail.com>
Date: 2007-01-21 14:29:35 CET
On 1/17/07, Daniel Rall <dlr@collab.net> wrote:
Basically it's WSF's version of getopts, if I understand getopts right.
Simple example.
Let's say I have a wsf script which copies the contents of one
So, I do this:
cscript.exe copyfiles.wsf c:\source c:\destination
and in the wsf (I use JavaScript in my WSH scripts), I have:
var sourceDir = WScript.Arguments.Unnamed(0);
However, if I set my script up for named variables, I'll do this:
cscript.exe copyfiles.wsf //dest:"c:\destination" //source:"c:\source"
var sourceDir = WScript.Arguments.Named.Item("source");
Now that I'm using named variables, the order they're passed on the
One can mix named and unnamed arguments, but my preference is to name
---------------------------------------------------------------------
|
This is an archived mail posted to the Subversion Dev mailing list.
This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.