The ftp client does not set return codes so much, but ftp server
implementations do reply with various semi-standard messages. 2xx messages
indicate a successful operation, 4xx problems, 5xx failures. So, what you
can do is put ftp commands into somewhat atomic ftp command files. Then
redirect output into log files, and use find to find either significant
results, or significant errors. For instance:
ftp -s:ftpcmds.txt > ftpcmds.log
find /i "250 transfer completed successfully"
if not errorlevel 1 goto success
if errorlevel 1 goto failed
or some variation thereof. All of the above can be neatly packaged into a
single batch file, which accepts a single parm for both the ftp command file
and log file base names. Of course, scripting options abound, and you want
to go with something that you and your co-workers can reasonably support.
I've used batch file programming on NT / Windows 2000 because I assume that
this is generally supportable with documentations, whereas on Linux I've
used perl.
Greg Stigers, MCSA
this space for rent