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,801 of 68,980    |
|    Anton Shepelev to All    |
|    Re: Replacing a character with a percent    |
|    30 May 24 13:33:47    |
   
   From: anton.txt@g{oogle}mail.com   
      
   Herbert Kleebauer:   
      
   > I don't see any file IO   
      
   I mentioned IO as a possible way to use the HDD as an   
   external memory in the script -- a crazy idea that I   
   abandoned.   
      
   > and if VAR doesn't have any spaces or other delimiters und   
   > there are only single #, than this should work (but what   
   > is wrong with delayed expansion?):   
      
   I consider this additional limitation as a challenge.   
      
   > set var=a#b#c   
   >   
   > set var2=%var:#= %&set var=&   
   > for %%i in (%var2%) do call set var=%%var%%%%i%%%%   
   > set var=%var:~0,-1%   
   >   
   > echo %var%   
      
   Thank you. You use CALL SET to effect a double (a therefore   
   delayed) expansion. The `&' in `set var=&' seems   
   unnecessary. Is it there to avoid potential trailing   
   whitespace?   
      
   --   
   () ascii ribbon campaign -- against html e-mail   
   /\ www.asciiribbon.org -- against proprietary attachments   
      
   --- 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