in reply to Re: Re: Re: Re: Net::ftp - copy of file in cgi-bin
in thread Net::ftp - copy of file in cgi-bin
If so, and if you are not specifying an absolute path to your final destination, you could be pulling the file into a default location, which is the directory where the script resides. Or in the case of a cron job, the users home directory. Now, you could do a chdir() prior to invoking Net::FTP and put your process into the destination directory. Or, you might be able to specify where you want the file in your "GET" statement. Since you are only involving two servers, there really does not seem to be a need to do two FTP's.
You might try something like this:
orchdir("/local/destination/for/file") or die "Cannot chdir $!"; $ftp->get("myfile.txt","my_new_file.txt");
Does that help any? (I think I'm understanding what you are trying to do :)$ftp->get("/remote/path/to/file/myfile.txt","/local/path/to/file/myfil +e.txt");
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Re: Re: Re: Net::ftp - copy of file in cgi-bin
by jonnyfolk (Vicar) on Oct 28, 2003 at 19:22 UTC |