home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 3 Comm
/
03-Comm.zip
/
fax067.zip
/
fqueue.cmd
< prev
next >
Wrap
OS/2 REXX Batch file
|
1996-11-29
|
4KB
|
85 lines
/* faxqueue.cmd Ver. 1.0 18-10-1995 */
/* Run it from FREC ClPageOk fqueue.cmd or afterwards from cmd-line */
/********************< B E G I N - S E T U P >*******************************/
/*
This is the Setuppart. I hope it is not too difficult for you to
declare 4 Directoryvar's ;-) . Leading and trailing " ' " are needed,
so don't forget them.
*/
FaxInBound = 'D:\bound\fax' /* Here we store the */
/* faxes received by FREC */
FaxSpec = 'FX*.FAX' /* Filemask for faxes */
FaxStore = 'D:\bound\fax\printed' /* Here we store printed */
/* faxes */
FRECDir = 'D:\cl2\addon\frec' /* Where we find FREC */
/*******************< E N D - S E T U P >*************************************/
'@echo off'
CALL RXFUNCADD 'SYSLOADFUNCS','REXXUTIL','SYSLOADFUNCS'
CALL SYSLOADFUNCS
say ''
say ' ┌───────────────────────────────────────────────────────────────╖'
say ' │ F A X - Q U E U E (c) 1995 by Lutz Buchheister (2:240/5304) ║░'
say ' │ Version 1.0 ║░'
say ' │───────────────────────────────────────────────────────────────║░'
say ' │ FREC/2 is by Harald Pollack (2:310/14.59) ║░'
say ' ╘═══════════════════════════════════════════════════════════════╝░'
say ' ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░'
say ' '
homedir=directory()
call directory(FaxInBound)
call SysFileTree FaxSpec, 'fqueue', 'F'
/* Anybody home ? */
if fqueue.0 = 0 then
do
say ' '
say 'Faxqueue is empty, nothing to do ! Exiting now ....'
call directory(homedir)
EXIT
RETURN()
END
/* Display FAX-Queue on screen */
Do i= 1 to fqueue.0
fxname.i=subword(fqueue.i,5,1)
fxattr.i=subword(fqueue.i,4,1)
fxsize.i=subword(fqueue.i,3,1)
fxtime.i=subword(fqueue.i,2,1)
fxdate.i=subword(fqueue.i,1,1)
END
Say 'Set Faxname Date Time Size Attrib'
Say '─── ────────────────────────────── ──────── ─────── ──────── ───────'
Do i= 1 to fqueue.0
say right(i,3) left(fxname.i,30) fxdate.i right(fxtime.i,6) right(fxsize.i,8) right(fxattr.i,7)
End
Say' '
/* Wait to see what's in */
call syssleep 5
/* Let's print the queue */
call directory(frecdir)
do i= 1 to fqueue.0
Say 'Pushing Fax #'i '-> 'fxname.i 'into PM-Printerqueue'
'faxview -PRINT -b'||fxname.i
if rc <>0 then Say 'Something strange happend...'
Else Say ' Printing ' fxname.i
Say ' Copying ' fxname.i 'to printed fax storage !'
'copy 'fxname.i faxstore ' >nul'
if rc=0 then 'del 'fxname.i '/N'
else say 'Error copying 'fxname.i 'to' faxstore
Say ' '
End
call directory(homedir)
call SysDropFuncs
Return