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,879 of 68,980    |
|    R.Wieser to All    |
|    Re: Comma in an argument value    |
|    05 Dec 24 16:32:14    |
   
   From: address@is.invalid   
      
   > I would suggest to use multiple FOR loops for your   
   > parsing:   
   >   
   > FOR /F "tokens=1* delims= " %%A in ("%*") DO SET ARG1=%%A   
   > FOR /F "tokens=2* delims= " %%A in ("%*") DO SET ARG2=%%A&SET ARGR=%%B   
   > echo [%ARG1%][%ARG2%][%ARGR%]   
      
   Meh. I'm using batch way to little. The intarwebz returned an even simpler   
   solution:   
      
   FOR /F "tokens=1-2*" %%A in ("%*") DO (   
    SET ARG1=%%A   
    SET ARG2=%%B   
    SET ARGR=%%C   
   )   
   echo [%ARG1%][%ARG2%][%ARGR%]   
      
   https://stackoverflow.com/questions/382587/how-to-get-batch-file   
   parameters-from-nth-position-on   
   (Patrick Cuff)   
      
   Regards,   
   Rudy Wieser   
      
   --- SoupGate-DOS v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   
|
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca