Forums before death by AOL, social media and spammers... "We can't have nice things"
|    alt.msdos.batch    |    Fun with MS-DOS batch files    |    42,547 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 40,729 of 42,547    |
|    Stanley Daniel de Liver to blinkingblythe01@gmail.com    |
|    Re: Enviroment variables not staying aft    |
|    16 Aug 13 08:51:30    |
   
   From: admin@127.0.0.1   
      
   On Thu, 25 Jul 2013 06:06:04 +0100, wrote:   
      
   []   
   > rem This is a Batch counter. Every time this file runs it will count up   
   >   
   > rem one number.   
      
   rem this will cycle count from 0-9 it depends on count being null to start   
      
   if "%count%"=="" set count=0   
      
   if %count%==9 set count=0   
   if %count%==8 set count=9   
   if %count%==7 set count=8   
   if %count%==6 set count=7   
   if %count%==5 set count=6   
   if %count%==4 set count=5   
   if %count%==3 set count=4   
   if %count%==2 set count=3   
   if %count%==1 set count=2   
   if %count%==0 set count=1   
      
   The canonical way to count (for a smallish count - 255?) is   
      
   set counter=%counter%#   
      
   if %counter%=########## echo limit reached   
      
      
   --   
   It's a money /life balance.   
      
   --- 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