[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

R: [FTPAPI] Reply message from ftp_put



Hi Charles,

you are right! I'm actually going in a wrong way.

I replay to Scott a complete explanation of the problem.

I'll try the Michael's suggestion, but I found another solution....a bit
complicated but useful.

Let's me explain in detail:

1. put on the logging (ftp_logging)
2. after operations (i.e. ftp_put), if there are no problem, call a
procedure that explore the job log

The procedure will use a command SAVJOBLOG (here the link:
http://systeminetwork.com/article/save-job-logs-database-file-easy-way
[Look! there are some error in the source statement, I correct it.]) to
write a file with complete job log and next extract the line with job
number.

The limitation is that the procedure must be run for each specific FTP
command to restrict the lines.

When I complete the procedure, I'll post it to mailing list, thank you all
so much!

HTH (what means?),
Luciano



-----Messaggio originale-----
Da: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
[mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] Per conto di Charles Wilt
Inviato: lunedì 13 dicembre 2010 20:27
A: HTTPAPI and FTPAPI Projects
Oggetto: Re: [FTPAPI] Reply message from ftp_put

Luciano,

I think you're going about this the wrong way...

One of the big benefits of FTPAPI is that you don't need to parse the
non-standard message string returned by an FTP server.

ftp_put() returns a 0 if successful and a -1 if an error occurs...

That's the only thing you need to check to see that the file was
uploaded successfully.  If the results is -1 you can then call
ftp_errorMsg() to get the string returned; but the returned string is
only used for information diagnostic purposes.

HTH,
Charles


On Mon, Dec 13, 2010 at 9:49 AM, Luciano Vigna <luciano.vigna@xxxxxxxxx>
wrote:
>
>   Hello, everyone
>
>
>   How can retrieve the message response from the ftp_put command? (i.e.
>   "226 File upload OK" or any error message), we need to know if the
>   file was upload correctly or not.
>
>
>   Thanks so much!
>
>
>   Luciano
>
> -----------------------------------------------------------------------
> This is the FTPAPI mailing list.  To unsubscribe, please go to:
> http://www.scottklement.com/mailman/listinfo/ftpapi
> -----------------------------------------------------------------------
>
>
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------

-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------