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,774 of 68,980    |
|    R.Wieser to All    |
|    Re: Use the remaining arguments ?    |
|    22 Apr 24 22:28:26    |
      From: address@is.invalid              Herbert,              > I suppose you do some other task in the batch before you       > start the program with %*.              No, I don't. Checking that %1 argument is, part from the "@echo off" the       first line in the script.              > Or tell us, what exactly you want to do.              Would it make a difference if I told you that the exact "first" line is "if       exist %1.ext goto DoExt" ?              >> Besides it throwing an error when an unknown first argument would be       >       > But exactly that should a program do: if you give an illegal input,       > it should give an error.              It should. But there is quite a bit of difference between the crude error       the OS spew out and a much nicer "hey dumbass, check your input and try       again." message, don't you think ? :-)              > Here I get:       > program 1 was called with parameter foo       >       > The 1 is removed from the parameters because it is used as label       > for the call statement.              My apologies. I didn't test it and now I did I see eyou are indeed right.              I think I took that "call" as a "goto" ... :-|              > The 1 is removed from the parameters because it is used as label       > for the call statement.              Yep. I tried, for good measure, "call" as well as "goto" and that was       indeed the difference.              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