/*---------------------------------------------------------------------------*\
|  Get Lan Server Statistics                  (C) Alain Rykaert - AUG97-AUG98 |
\*---------------------------------------------------------------------------*/
    Version = '1.03'

    Parse Upper Arg ServerName TargetFile Option

    If ServerName = '' | TargetFile = ''
      Then Exit
      Else Nop

   '@echo off'

    Call ChkFile Directory()'\lsc.cmd'
    Call ChkFile Directory()'\magicbox.exe'

 GETSTAT:/* -----------------------------------------------------------------*/

    If Stream(TargetFile, 'C', 'Query Exists') = ''
      Then Nop
      Else 'del' TargetFile

    If Option = 1
      Then Do
            'call lsc' ServerName '/stat >' TargetFile
            'start magicbox' TargetFile 'Lan Server Statistics -' ServerName
           End
      Else Do
            'call lsc' ServerName   '>' TargetFile
            'start magicbox' TargetFile 'Lan Server Check -' ServerName
           End


    Exit

 CHKFILE:/* -----------------------------------------------------------------*/

    Parse Arg FileToCheck

    If Stream(FileToCheck,'C','Query Exists') = ''
      Then Do
             Say '* File not found:' FileToCheck '07'x
             Exit X2D('0800')
          End
      Else Nop

    Return

