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

  1. /*---------------------------------------------------------------------------*\
  2. |  Get Lan Server Printer Queues              (C) Alain Rykaert - AUG97-AUG98 |
  3. \*---------------------------------------------------------------------------*/
  4.     Version = '1.04'
  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()'\qprint.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.    'call qprint' ServerName '>' TargetFile
  24.    'start magicbox' TargetFile 'Printer Queue Information -' ServerName
  25.  
  26.     Exit
  27.  
  28.  CHKFILE:/* -----------------------------------------------------------------*/
  29.  
  30.     Parse Arg FileToCheck
  31.  
  32.     If Stream(FileToCheck,'C','Query Exists') = ''
  33.       Then Do
  34.              Say '* File not found:' FileToCheck '07'x
  35.              Exit X2D('0800')
  36.           End
  37.       Else Nop
  38.  
  39.     Return
  40.  
  41.