Forums before death by AOL, social media and spammers... "We can't have nice things"
|    alt.msdos.batch.nt    |    Fun with Windows NT batch files    |    68,980 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 68,770 of 68,980    |
|    R.Wieser to All    |
|    Use the remaining arguments ?    |
|    22 Apr 24 17:16:03    |
      From: address@is.invalid              Hello all,              I've got a batchfile in which I use the first (%1) argument as a switch to       decide which program should be started with the remaining arguments.              The problem is that I can't seem to find how to pass the unknown number       of(!) remaining arguments to the called program.              I'm aware of "%*", which stands for "all arguments but %0", but when I use       SHIFT (to get rid of "%1" it doesn't change.              iow:              echo %*       shift       echo %*              shows the same on both lines.              Question:       How do I provide all arguments starting from the second one to the program ?              Currently I just use "program.exe %2 %3 %4 %5 %6 %7 %8 %9" and be done with       it, but would like to know a way to provide more than 9 arguments to the       batchfile and still have it work.              Regards,       Rudy Wieser              --- SoupGate-Win32 v1.05        * Origin: you cannot sedate... all the things you hate (1:229/2)    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca