Retrieve 00GLOBAL.TXT from Hobbes FTP site

Автор: Jonathan de Boyne Pollard

Скачать скрипт.

/* 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('beit.fcn.ru', 'anonymous', 'os2user@') then do
 say 'Successfully connected to hobbes.nmsu.edu.'
 if FtpChDir('/pub/_os2_') >= 0 then do
  say 'Downloading "/pub/_os2_/tree.txt" ...'
  if FtpGet('tree.txt', 'tree.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