home *** CD-ROM | disk | FTP | other *** search
/ High Voltage Shareware / high1.zip / high1 / DIR11 / MAIL2FX2.ZIP / SENDFAX.BAT < prev    next >
DOS Batch File  |  1993-09-18  |  1KB  |  46 lines

  1. @ Echo off
  2. Rem  Batch file to run the fax program from MAIL2FAX.EXE
  3. Rem  If you are using a ZYXEL or fully compatible modem you do not need a 
  4. Rem  batch file.
  5. Rem
  6. Rem  Below is an example of how you might adapt modem using different 
  7. Rem  ERRORLEVEL codes
  8. Rem     We assume that this modem (the BelchModem V28.8) creates a log file when
  9. Rem  it runs, but not if transmission fails (we want errorlevel 4 or 38)
  10. Rem  We further assume that it does set the following error levels
  11. Rem        3 - Busy          (we want 1 or 34)
  12. Rem     9 - no dial tone  (want 2 or 36)
  13. Rem    11 - No answer     (want 3 or 37)
  14.  
  15. Rem     Delete log file
  16. erase BelchMdm.Log
  17.  
  18. Rem  %1 below refers to the file, %2 to the fax number
  19. BelchMdm  %1 %2
  20.  
  21. IF  NOT Exist  BelchMdm.Log  Goto Failed
  22.  
  23. Rem Note that we must test for highest ERRORLEVEL first
  24.  
  25. IF  ERRORLEVEL  11  Goto RNA
  26. IF  ERRORLEVEL   9  Goto NoDial
  27. IF  ERRORLEVEL   3  Goto Busy
  28.  
  29. Goto Exit
  30. :Failed
  31.     EC 4
  32. Goto Exit
  33.  
  34. :RNA
  35.     EC 3
  36. Goto Exit
  37.  
  38. :NoDial
  39.     EC 2
  40. Goto Exit
  41.  
  42. :Busy
  43.     EC 1
  44. :Exit
  45. Rem -End-
  46.