RETFTP

John Tsucalas

jtsucala@ix.netcom.com

 

RETFTP is a very simple, but useful, utility to execute ftp's
from a batch.  If you have tried to create a batch job that
executes ftp.exe as it is included in Windows NT or 95 you will
find that it does not return a code to the batch if an error has
been encountered.  This means that you cannot put automatic error
detection in place.

RETFTP helps you out by executing FTP and watching the output for
errors. When it sees one it will note this and report the error in
your output.  After completion, RETFTP will return an error as follows:

0 No error
1 RETFTP failed
2 Known Error message found
3 Error message format found

(Pretty much, if the error is greater than 0, something is wrong.)

Using RETFTP is easy, you call it just like command line ftp.exe.
As a matter of fact it passes all of your parameters to the
command line of ftp.exe.  Shown below is a sample batch execution:

  Command
    retftp -s:myinput.txt 127.0.0.1

  Output
    RETFTP - ftp shell

    John Tsucalas 1998
    Trial Version NOT REGISTERED
    Request registration: jtsucala@ix.netcom.com
    Or write: John Tsucalas
              21211 Park Bend Dr.
              Katy, TX 77450
    Calling FTP...
    Connected to 127.0.0.1.
    220 etsjohnnb2 Microsoft FTP Service (Version 3.0).
    User (127.0.0.1:(none)):
    331 Anonymous access allowed, send identity (e-mail name) as password.

    230 Anonymous user logged in.
    ftp> ftp>
    ls
    200 PORT command successful.
    150 Opening ASCII mode data connection for file list.
    226 Transfer complete.
    ftp> bye
    221

Now look at one that failed:
    RETFTP - ftp shell

    John Tsucalas 1998
    Trial Version NOT REGISTERED
    Request registration: jtsucala@ix.netcom.com
    Or write: John Tsucalas
              21211 Park Bend Dr.
              Katy, TX 77450
    Calling FTP...
    Connected to 127.0.0.1.
    Login failed.
    *************** Error Found ***************
    Error text: Login failed.
    220 johntsu Microsoft FTP Service (Version 3.0).
    User (127.0.0.1:(none)):
    331 Password required for badid.

    530 User badid cannot log in.
    ftp> ftp>
    *************** Error Found ***************
    Error text: 530 User badid cannot log in.
    ls
    200 PORT command successful.
    530 Please login with USER and PASS.
    ftp> bye
    221
    *************** Error Found ***************
    Error text: 530 Please login with USER and PASS.

But most important is not what you can see. The run that failed
returned an exit code. So you can set up that pager routine or
that automatic e-mail from your batch.

RETFTP is not intended to be an interactive tool.  If you are just
going to type the ftp commands, USE FTP.  Use RETFTP for batch:

    retftp -s:..\retftp.ftp localhost
    if ERRORLEVEL 1 goto pageme

REGISTER RETFTP:

To get a proper version of RETFTP please send $20 to:

John Tsucalas
21211 Park Bend Dr.
Katy, TX 77450

-- Please include your --
Name:
Address:
Phone (optional):
e-mail:
Where you got RETFTP:
-------------------------

Download RETFTP Now
jtsucala@ix.netcom.com

John Tsucalas' Home Page

Visit WinFiles.com Now!

WebAttack