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

  1. /*---------------------------------------------------------------------------*\
  2. |  Get Lan Server Statistics                  (C) Alain Rykaert - AUG97-NOV97 |
  3. \*---------------------------------------------------------------------------*/
  4.     Version = '1.02'
  5.  
  6.     Parse Upper Arg ServerName TargetFile
  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()'\pmbrwbox.exe'
  16.  
  17.  GETSTAT:/* -----------------------------------------------------------------*/
  18.  
  19.     If Stream(TargetFile, 'C', 'Query Exists') = ''
  20.       Then Nop
  21.       Else 'del' TargetFile
  22.  
  23.    'call lsc' ServerName '1 >' TargetFile
  24.  
  25.    'start pmbrwbox "OK",,"Server Statistics -"'ServerName','TargetFile
  26. /* 'start e' TargetFile */
  27.  
  28.     Exit
  29.  
  30.  CHKFILE:/* -----------------------------------------------------------------*/
  31.  
  32.     Parse Arg FileToCheck
  33.  
  34.     If Stream(FileToCheck,'C','Query Exists') = ''
  35.       Then Do
  36.              Say '* File not found:' FileToCheck '07'x
  37.              Exit X2D('0800')
  38.           End
  39.       Else Nop
  40.  
  41.     Return
  42.  
  43.