home *** CD-ROM | disk | FTP | other *** search
- /*
- ** $PROJECT: HyperText-DataType-System
- **
- ** $VER: ftp.rexx 40.1 (10.11.96)
- **
- ** $AUTHOR: Stefan Ruppert , Windthorststrasse 5 , 65439 Floersheim , GERMANY
- **
- ** $COPYRIGHT: (C) Copyright 1996 by Stefan Ruppert, All Rights Reserved!
- **
- ** $EMAIL: Stefan.Ruppert@informatik.fh-wiesbaden.de
- **
- ** $REQUIRES: TCP/IP-Stack, FtpMount
- **
- ** $HISTORY:
- **
- ** 10.11.96 : 040.001 : initial
- **
- */
-
- Options Results
-
- Parse Arg args
-
- /* --------------------------- needed libraries --------------------------- */
-
- Call AddLib('rexxsupport.library',0,-30,0)
- Call AddLib('rexxdossupport.library',0,-30,0)
-
- ftp.ftppath = 'ftp://localhost/'
- ftp.localdir = 'Backup:download'
-
- /* ------------------------ end customize section ------------------------- */
-
- If ReadArgs(args,'FTPPATH/K,LOCALDIR/K,QUIET/S','FTP.') Then Do
-
- If ~ShowList('h','FTP') Then Do
- Address Command 'Mount ftp:'
-
- If ~ShowList('h','FTP') Then Do
- Say 'Cannot mount ftp-handler.'
- Exit 10
- End
- End
-
- cmd = 'copy FROM="' || ftp.ftppath || '" TO="' || aminet.localdir || '"'
-
- If ~ftp.quiet Then
- Say 'Running: ' || cmd
-
- Options Failat 21
-
- Address Command cmd
-
- If RC = 0 Then Do
- If ~ftp.quiet Then Do
- localfile = AddPart(ftp.localdir, FilePart(ftp.ftppath))
- Say 'Aminet download for ' || FilePart(ftp.ftppath) || ' finished :'
- Address Command 'List ' || localfile || ' NOHEAD'
- End
- End
- Else If ~ftp.quiet Then
- Say 'Ftp download for ' || ftp.ftppath || ' failed !'
- End
-
-