in reply to (Re: x 8) Problem using Net::FTP
in thread Problem using Net::FTP

hi jarich

thanks again !
with move works well.

sorry for asking again, but I have other question
howto check if the first file was transfered succesfully
and be 100% sure, that the first file is already on the remote server
and only then send the second file ?
my really problem is, I cannot send the second file, when the first file is not there.

greetings
cc

Replies are listed 'Best First'.
(Re: x 10) Problem using Net::FTP
by jarich (Curate) on May 10, 2004 at 05:06 UTC
    Read the documentation. I'm sure it'll tell you what happens if it fails to upload the file. Perhaps it returns false if that happens?

    Once you know what happens after failure, you should be able to cater for that.

    I would presume that your $ftp->put($new) or die "$server: cannot put $new: " . $ftp->message; would be sufficient myself...

    If you're seeing cases where $ftp->put($new) is not returning false and if that's what the documentation says it should and the file is not being successfully transferred then that's a different matter, and one I can't help you with.

    If you are seeing cases like that then you should try to identify under what circumstances that's happening. If you can identify the circumstances, and repeat the problem, but not fix it, then that would make an excellent SOPW question.

    All the best,

    jarich

      thanks !

      greetings
      cc