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,773 of 68,980    |
|    Zaidy036 to R.Wieser    |
|    Re: Use the remaining arguments ?    |
|    22 Apr 24 16:29:15    |
      From: Zaidy036@air.isp.spam              On 4/22/2024 11:16 AM, R.Wieser wrote:       > 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       >       >       Combine arguments separating by some known character and then split them       within the batch itself.              --- 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