Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Perl ftp truncates file 1

Status
Not open for further replies.

chiarak

Programmer
Nov 26, 2001
23
0
0
AU
Hi

I am using Net::FTP to ftp a file as follows :

$ftp-NET::FTP->new($server);
$ftp->login($name,$pwd);
$ftp->cwd( "..");
$ftp->ascii();
$ftp->put($dataFile,$localFileName);
printf"%s\n",$ftp->message;
$ftp->quit;


When I open the file that has been transferred it is truncated and is always missing the last 4-5 lines.
Is there something else I am missing ??
Any idea why my file is being truncated???

I appreciate any suggestions..

Thanks
 
Hi - problem solved...

Turns out that the files were not being ftped in full due to the fact that I was not closing them beforehand. They were opened earlier in the script to add data to and the ftp was dropping records as I was not closing them afterwards.

Thanks anyway..
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top