home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 8 Other / 08-Other.zip / lsmt213c.zip / q_lsc.cmd < prev    next >
OS/2 REXX Batch file  |  1998-12-10  |  1KB  |  49 lines

  1. /*---------------------------------------------------------------------------*\
  2. |  Get Lan Server Statistics                  (C) Alain Rykaert - AUG97-AUG98 |
  3. \*---------------------------------------------------------------------------*/
  4.     Version = '1.03'
  5.  
  6.     Parse Upper Arg ServerName TargetFile Option
  7.  
  8.     If ServerName = '' | TargetFile = ''
  9.       Then Exit
  10.       Else Nop
  11.  
  12.    '@echo off'
  13.  
  14.     Call ChkFile Directory()'\lsc.cmd'
  15.     Call ChkFile Directory()'\magicbox.exe'
  16.  
  17.  GETSTAT:/* -----------------------------------------------------------------*/
  18.  
  19.     If Stream(TargetFile, 'C', 'Query Exists') = ''
  20.       Then Nop
  21.       Else 'del' TargetFile
  22.  
  23.     If Option = 1
  24.       Then Do
  25.             'call lsc' ServerName '/stat >' TargetFile
  26.             'start magicbox' TargetFile 'Lan Server Statistics -' ServerName
  27.            End
  28.       Else Do
  29.             'call lsc' ServerName   '>' TargetFile
  30.             'start magicbox' TargetFile 'Lan Server Check -' ServerName
  31.            End
  32.  
  33.  
  34.     Exit
  35.  
  36.  CHKFILE:/* -----------------------------------------------------------------*/
  37.  
  38.     Parse Arg FileToCheck
  39.  
  40.     If Stream(FileToCheck,'C','Query Exists') = ''
  41.       Then Do
  42.              Say '* File not found:' FileToCheck '07'x
  43.              Exit X2D('0800')
  44.           End
  45.       Else Nop
  46.  
  47.     Return
  48.  
  49.