|
Answer» Hi All I'm using task schedular to search a list of workstations for a file to VERIFY that SAP is installed on the machine I would LIKE to KNOW how can I INCREMENT the time for each workstation because the default share only allow you to make a few connections at the same time and I have to inventory 1700 workstations for this information the command that I use to schedule this task on the different machines is as follows for /f %i in (newuid.txt) do execute %i 9:50A if possible I would like to increment that time by 1 minute for each new machine from the list
this is the script that I'm executing on the remote machine
ECHO OFF
@if exist "c:\Program Files\SAP\SapSetup\setup\SAL\saplgpad.s8l" goto PIPE :PIPE @net use B: /delete /y @net use B: \\sapserver\SAPSTAT B: @set path=c:\WINDOWS\system32; echo Copying started at %date% %time% %COMPUTERNAME%>>B:\SAPSTAT.LOG net use b: /delete /y EXITChange the command you use to a batch file and use something like this: Code: [Select]@echo off setlocal enabledelayedexpansion set Hour=9 set Min=50 set AMPM=A for /f %%i in (newuid.txt) do ( set /a Min+=1 if !Min! GEQ 60 ( set Min=0 set /a Hour+=1 if !Hour! GEQ 13 ( set Hour=1 ) if !Hour! EQU 12 ( if /I "!AMPM!"=="A" (set AMPM=P) else set AMPM=A ) ) if !Min! LSS 10 ( echo execute %%i !Hour!:0!Min!!AMPM! ) else echo execute %%i !Hour!:!Min!!AMPM! )
|