TIP: Click on subject to list as thread! ANSI
echo: os2rexx
to: All
from: Jonathan de Boyne Pollard
date: 1999-11-03 10:21:02
subject: A script that demonstrates the use of RxFTP

/* GET_GLOBAL.CMD -- Retrieve 00GLOBAL.TXT from Hobbes FTP site */
/*
 * This is a REXX script that retrieves the 00GLOBAL.TXT file from the
 * Hobbes OS/2 FTP site in New Mexico State University in the United State.
 *
 * (c) Copyright 1997 Jonathan de Boyne Pollard.  All rights reserved.
 *
 * Permission is hereby granted for you to use, copy, modify, and redistribute
 * this script to your heart's content, as long as you make no money from
 * doing so, and as long as you realise that I accept no responsibility for
 * whatever posession or use of this script may do to your machine, data,
 * cat, or marital status.
 *
 * NOTE: This script requires that you have installed the RxFTP library.
 */

call RxFuncAdd 'FtpLoadFuncs','RxFTP','FtpLoadFuncs'
rc = FtpLoadFuncs()

if FtpSetUser('hobbes.nmsu.edu', 'anonymous', 'os2user@') then do
        say 'Successfully connected to hobbes.nmsu.edu.'
        if FtpChDir('/pub/os2') >= 0 then do
                say 'Downloading "/pub/os2/00global.txt" ...'
                if FtpGet('00global.txt', '00global.txt', 'Ascii') >= 0 then
                        say '"00global.txt" has been successfully retrieved'
                else
                        say 'FTP error 'FtpErrNo' retrieving "00global.txt"'
        end
        else
                say 'FTP error 'FtpErrNo' changing to directory "/pub/os2"'
end
else
        say 'Cannot log in to the Hobbes OS/2 FTP site !'
call FtpLogoff

/* ¯ JdeBP ® */

--- FleetStreet 1.22 NR
209/7211
103
* Origin: JdeBP's point, using Squish (2:257/609.3)

SOURCE: echoes via The OS/2 BBS

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.