home bbs files messages ]

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 67,533 of 68,980   
   Mark Ise to Herbert Kleebauer   
   Re: for-loop cannot process braces   
   06 May 20 21:38:45   
   
   From: mark.ise@arcor.de   
      
   Herbert Kleebauer schrieb am 05.05.2020 um 22:47:   
   > On 05.05.2020 16:17, Mark Ise wrote:   
      
   >   
   > You can first copy %* to %x%, using a single "" for each parameter   
   > and then use  %x% instead of %* in the for loop:   
   >   
   > @echo off   
   >   
   > call :sub "F:\z2\Test1 ().txt" F:\z2\Test2().txt F:\z2\Test3.txt   
   > goto :eof   
   >   
   > :sub   
   > set x=   
   > :loop   
   > if [%1]==[] goto :end   
   > set x=%x% "%~1"   
   > shift   
   > goto :loop   
   > :end   
   >   
   > for %%i in (%x%) do (   
   >     echo %%i   
   >  )   
      
   Thank you both!   
   That was a great help and my batch works with your modifikations.   
      
   --   
   Mark   
      
   --- 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