[windows2000] Re: Multiple arguments in a batch

  • From: Jeremiah Kivi Shapiro <kivi_s@xxxxxxxxx>
  • To: windows2000@xxxxxxxxxxxxx
  • Date: Wed, 11 Sep 2002 20:28:16 -0400 (EDT)

"Costanzo, Ray" <rcostanzo@xxxxxxxxxxx> wrote:
> Is there a way to grab all arguments beyond #3
> and stick them in one variable?

SHIFT, and a loop, would do it.  Try this:

Set Arg1=%1
Set User=%2
Set Pass=%3
SHIFT & SHIFT & SHIFT
Set Dates=
:Loop
  IF "%1" == "" GOTO :Loopend
  Set Dates=%Dates% %1
  SHIFT
  GOTO :Loop
:Loopend
ECHO Done. Dates=%Dates%

Yours,
Kivi
with some third-party software

______________________________________________________________________ 
Post your free ad now! http://personals.yahoo.ca

==================================
To Unsubscribe, set digest or vacation
mode or view archives use the below link.

http://thethin.net/win2000list.cfm

Other related posts: