Result Code of FTP Script
Kurt Wall
kwall
Fri Dec 17 20:00:11 PST 2004
On Fri, Dec 17, 2004 at 04:42:27PM -0500, Brad De Vries took 38 lines to write:
> Hey all, does anyone know of a way to obtain the result code of an FTP script?
>
> I have a script file:
> -----------
> open rmt_srv
> user test test123
> cd /incoming
> put file1
> bye
> -----------
Use ncftpput. It is specifically designed for use in a script
and returns a variety of more useful return codes:
0 Success.
1 Could not connect to remote host.
2 Could not connect to remote host - timed out.
3 Transfer failed.
4 Transfer failed - timed out.
5 Directory change failed.
6 Directory change failed - timed out.
7 Malformed URL.
8 Usage error.
9 Error in login configuration file.
10 Library initialization failed.
11 Session initialization failed.
Kurt
--
Captain Penny's Law:
You can fool all of the people some of the time, and some of
the people all of the time, but you Can't Fool Mom.
More information about the Linux-users
mailing list