[windows2000] Re: Multiple arguments in a batch

  • From: Jonathan Chan <jchan@xxxxxxxxxxxxx>
  • To: windows2000@xxxxxxxxxxxxx
  • Date: Mon, 09 Sep 2002 22:19:16 -0500

chances are your batch wont work right bc somewhere one of the dates wont 
be syntactically correctly. ;)

At 10:11 PM 9/9/2002, you wrote:

>So, what if 100 dates are passed?  I was hoping that there was a
>"%RestOfTheDamnArguments" but if not, I'll make do!
>
>Thanks,
>
>Ray at home
>
> >-----Original Message-----
> >From: windows2000-bounce@xxxxxxxxxxxxx
> >[mailto:windows2000-bounce@xxxxxxxxxxxxx] On Behalf Of Sullivan, Glenn
> >
> >
> >
> >Set Dates=%4 %5 %6
> >
> >Have fun,
> >
> >Glenn Sullivan, MCSE+I  MCDBA
> >David Clark Company Inc.
> >
> >-----Original Message-----
> >From: Costanzo, Ray [mailto:rcostanzo@xxxxxxxxxxx]
> >Subject: [windows2000] Multiple arguments in a batch
> >
> >
> >
> >Hi list,
> >
> >I'm writing a batch file that will expect some arguments.  The
> >number of
> >arguments can vary, however.  Like, someone may enter any of
> >these three
> >things, for example:
> >
> >file.bat Arg1 Username Password Date1 Date2 Date3 Date4
> >file.bat Arg1 Username Password Date1
> >file.bat Arg1 Username Password
> >
> >
> >
> >What I want to do would essentially be:
> >Set Arg1=%1
> >Set User=%2
> >Set Pass=%3
> >Set Dates=%TheRest
> >
> >Does anyone know how I can get the rest?  I know I can use %*
> >for everything
> >or %[number] for a specific argument, but is there a way to grab all
> >arguments beyond #3 and stick them in one variable?
> >
> >Thanks,



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

http://thethin.net/win2000list.cfm

Other related posts: