home *** CD-ROM | disk | FTP | other *** search
/ CD Shareware Magazine 1999 April / CD_Shareware_Magazine_31.iso / WIN95 / INTERNET / ftpctrl3b8.exe / %MAINDIR% / Scripts / Example13.ftp < prev    next >
Encoding:
Text File  |  1999-02-07  |  1.6 KB  |  63 lines

  1. ; *****************************************************
  2. ; Example13.ftp
  3. ; =============
  4. ; This example checks if a local file is
  5. ; larger than 0 bytes - then it is tranferred!
  6. ; -----------------------------------------------------
  7. ; This example also shows the use of these commands:
  8. ;    Message "text..."
  9. ;    IF ... THEN ... ENDIF
  10. ;    Goto <label> 
  11. ; -----------------------------------------------------
  12. ; NOTE: This is just a sample - you are unable to 
  13. ; execute the script unchanged... ;o)
  14. ; *****************************************************
  15.  
  16. ; ******* First provide the Login information...
  17.  
  18. ; DialEntry="xxxxxxx"
  19. ; DialLoginUser="xxxxxxx"
  20. ; DialLoginPassword="xxxxxxx"
  21. Host="ftp.yourhost.net"
  22. Port="21"
  23. User="your.username"
  24. Password=" INK-n:┤LLJN-? "
  25. ; Proxy=
  26. ; ProxyPort=21
  27.  
  28. ; ******* Timeout in seconds...
  29. Timeout=120
  30.  
  31. ; ******* ...Dial up if not already connected to the Internet...
  32. ; Dial
  33.  
  34. ; *******  ...and then connect to FTP host...
  35. connect
  36.  
  37. ; *******  Command sequence...
  38.  
  39. remote-cd  "/myfiles"
  40.  
  41. ; Start of transfer part:
  42. :TryAgain
  43.    binary
  44.    if Local-FileSize("c:\autoexec.bat") > 0 then
  45.       send "c:\autoexec.bat" "autoexec.bat"
  46.       if Success then
  47.          Message "Send completed successfully" 
  48.          ; Jump to end whereas there was a successful transfer...
  49.          goto End
  50.       endif 
  51.       ; We had a bad transfer, so jump to "TryAgain"! 
  52.       goto TryAgain
  53.    endif 
  54. ; End of transfer
  55.  
  56. :End
  57.  
  58. ; *******  Afterwards, disconnect from host!
  59. disconnect
  60.  
  61. ; *******  At last, Hangup Internet connection!
  62. ; Hangup
  63.