home bbs files messages ]

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 41,822 of 42,547   
   Herbert Kleebauer to Arlen Holder   
   Re: Can a Windows batch script perform t   
   15 Apr 20 08:35:21   
   
   XPost: alt.comp.os.windows-10, microsoft.public.windowsxp.general   
   From: klee@unibwm.de   
      
   On 15.04.2020 03:34, Arlen Holder wrote:   
      
   > Now all I have to do is figure out how to run that script at random times.   
      
      
      
   But why do you create all these batch files? Just do all in a single one:   
      
   @echo off   
   setlocal enabledelayedexpansion   
      
   :loop   
   set /a n=137*%random%/32768*3+1   
   for /f "tokens=*" %%i in ('tzutil /l^|more +%n%') do set a=%%i& goto :l1   
   :l1   
   echo.   
   echo.   
   echo setting time zone to: %a%   
   tzutil.exe /s "%a%"   
      
   :: wait 6-24h   
   set /a n=20864+(%random%*2)   
   set /a h=%n%/3600   
   set /a m=(n-(%h%*3600))/60   
   echo waiting %h% hours, %m% minutes   
   timeout %n%   
   goto :loop   
      
   --- 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