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

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