home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 2 BBS / 02-BBS.zip / mailftp.zip / startppp.cmd < prev   
OS/2 REXX Batch file  |  1995-12-08  |  2KB  |  64 lines

  1. /***********************************************************************
  2.  * Purpose: To automate an FTP session using a PPP account to pull in
  3.  *          FidoTech stuff... rgwallen@datasync.com
  4.  
  5.  * StartPPP.CMD - Updated from Bill Seward's two liner startup script
  6.  * Rexx Script to login to provider and launch Ftp-Sstar script if login
  7.    is successful...
  8.  
  9.  * Pulled alot of stuff in from Don Russell's PPPDIAL.CMD script, along
  10.  * with comp.lang.rexx and OS2REXX newsgroup and echo areas.
  11.  
  12.  
  13. ***********************************************************************/
  14.  
  15. if RxFuncQuery("SysLoadFuncs") then
  16.    do
  17.    rc = RxFuncAdd("SysLoadFuncs","RexxUtil","SysLoadFuncs")
  18.    rc = SysLoadFuncs()
  19.    end
  20.  
  21. version = ".43"
  22. /* Introduction */
  23.    say
  24.    say "Start-Up Script for Ftp-Sstar Version "version
  25.    say "Created in 1995. This program is freeware"
  26.    say
  27.    say "Many thanks to all that helped make this"
  28.    say "possible and work! - especially to the"
  29.    say "author of PPPDIAL - Don Russell - v2.7"
  30.    say
  31.  
  32. '@C:'
  33. '@CD \tcpip\bin'
  34.  
  35. log = "c:\logs\fidoFtp.log"                    /* logfile location & name */
  36. day = left(date('E'),2)                    /* logfile day formatted leading 0 */
  37. mon = left(date('M'),3)                    /* logfile month formatted */
  38.  
  39. rc = stream(log,'C','open write')                /* create if not exist and write */
  40. say
  41. say 'Starting PPPDial v2.7 Rexx OS/2 FTP Session'
  42. say
  43. rc = lineout(log,' ')
  44. rc = lineout(log,''date('N') '---------------------------------------------')
  45. rc = lineout(log,''day' 'mon' 'time()' FTP begin, PPPDial v2.7 Rexx OS/2 Session')
  46. rc = lineout(log,''day' 'mon' 'time()' FTP Attempting PPP linkup with Datasync.com')
  47. rc = stream(log,'C','close')
  48.  
  49. call syssleep 3
  50.  
  51. /*  change this to the comport your goin to use along with the response file pathname. */
  52. 'ppp com2 115200 rtscts modem defaultroute priority 1 exit connect "pppdial.cmd c:\temp1\datasync.rsp"'
  53. say
  54. say 'PPP return code' rc
  55.  
  56. exit
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.