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,772 of 68,980    |
|    Herbert Kleebauer to R.Wieser    |
|    Re: Use the remaining arguments ?    |
|    22 Apr 24 18:38:16    |
      From: klee@unibwm.de              On 22.04.2024 17:16, 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.              > 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.              Why not use the program name itself as first parameter,       the you only need to use:              %*              to execute the program with the remaining parameters.              Or if you use numbers (or names) as first parameter to specify       the program you can use something like this:              call :%*       goto :eof              :1       echo program 1 was called with parameter %*       goto :eof              :2       echo program 2 was called with parameter %*       goto :eof              :3       echo program 3 was called with parameter %*       goto :eof              --- 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