cmd - Setting variable based on IF - Batch Scripting -


i have script i'm working on i'm pretty stuck on... may syntax error i'm not sure.

the script checks how old each file is hardcoded in script (this script subscript being generated another). checkage2.bat script outputs %age% variable if file on 20 minutes old age=1 otherwise age=0

set filepath="c:\pathtofile\filename1.slf"   call c:\pathtoscript\checkage2.bat %filepath%   if %age% equ 1 output=%output% %filepath%  set filepath="c:\pathtofile\filename2.slf"   call c:\pathtoscript\checkage2.bat %filepath%   if %age% equ 1 output=%output% %filepath%  set filepath="c:\pathtofile\filename3.slf"   call c:\pathtoscript\checkage2.bat %filepath%   if %age% equ 1 output=%output% %filepath% if (%output%) == () goto ok  echo critical: %output% pause  :ok echo ok: files within 20 minute time range  pause  

i'm trying output full list of files on 20 minutes old can't seem right! appreciated, all!

if %age% equ 1 output=%output% %filepath% 

maybe if set output=...


Comments

Popular posts from this blog

c - CUDA code not processing if block properly -

oracle11g - get root domain from url Oracle sql regex_substr -

xcode - Swift Playground - Files are not readable -