home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Troubleshooting Netware Systems
/
CSTRIAL0196.BIN
/
attach
/
pcc
/
v08n03
/
netwrk.exe
/
FAXBAT13.ZIP
/
SENDAFAX.BAT
< prev
next >
Wrap
DOS Batch File
|
1994-05-27
|
1KB
|
63 lines
@echo off
rem Syntax SENDAFAX (filename) (extension) (number) (sender)
rem Drive I: must be mapped to directory containing faxes.
echo.
echo Converting file %1.%2 for %4.
echo.
c:
rem This section will have to be rewritten for your fax software.
c:\ql2fax\convert i:%1.%2 /h
if errorlevel 1 c:\ql2fax\convert i:%1.%2 /x /h
if errorlevel 1 goto fail
echo.
echo Sending file %1.%2 to %3 for %4.
echo.
del c:\ql2fax\faxsend.log
h:\errorlen %3
rem If the number is five digits or longer, prepend 0 to get through the PABX.
if not errorlevel 5 goto nozero
c:\ql2fax\qld001 3 /f:i:%1 /fn:0%3
goto wait
:nozero
c:\ql2fax\qld001 3 /f:i:%1 /fn:%3
:wait
rem Wait for a log file to appear, and set errorlevel according to the result.
h:\logmon
if errorlevel 1 goto fail
rem This runs if fax was sent successfully.
z:\writelog f:\logs\faxmail.log %4 faxed %1.%2 to %3.
if '%2' == 'CNM' f:\applic\pegasus\pmail -t %4 -f i:%1.%2 -s "fax sent to %3"
if not '%2' == 'CNM' send "%2 file sent to %3" to %4
goto end
:fail
rem This runs if the fax failed to send.
z:\writelog f:\logs\faxmail.log %4 faxed %1.%2 to %3 (fail).
if '%2' == 'CNM' f:\applic\pegasus\pmail -t %4 -f i:%1.%2 -s "fax NOT sent to %3"
if not '%2' == 'CNM' send "%2 file NOT sent to %3" to %4
:end
rem This must get run to clean things up.
h:
del i:%1.*