raghu_shekar has asked for the wisdom of the Perl Monks concerning the following question:

i have a perl script to login to another server, look for a particular file and rename and get the file, everything works fine except that the entire file is not ftp'd. i get the error that says "cannot write to local file <file name> : file too large." any help would be greatly appriciated.

Replies are listed 'Best First'.
Re: FTP and get large files using perl
by Corion (Patriarch) on Feb 17, 2009 at 14:16 UTC

    This sounds to me like an error of the ftp server local machine. Most likely, buying a larger harddisk for the server local machine helps.

Re: FTP and get large files using perl
by marto (Cardinal) on Feb 17, 2009 at 14:17 UTC

    Are you using Net::FTP? Do you have enough space available on the target disk? What code are you using? When asking a question it helps to provide some details (platform, error message received etc) and the code you are using which results in the error.

    Update: s/recieved/received/

    Martin

Re: FTP and get large files using perl
by dHarry (Abbot) on Feb 17, 2009 at 14:15 UTC

    How big is the file? What is the maximum file size for ftp on your system?

Re: FTP and get large files using perl
by smanicka (Scribe) on Feb 17, 2009 at 16:02 UTC
    Most of the time, there is a limit on the file size of the file being transferred ( i know that at my work place its 2gig - 1 ). Why not try and just send the file in one go without performing any action to see if its because of this limit? you should be able to use any ftp program to perform this.Check this.else you might have to split the file with some method and reconstruct it on the local machine.
      Thanks a lot, but i think i got the solution... like u guys mentioned its the size of the disk thats smaller and couldnt accomodate the file. i tried running the script on a smaller file and it works like a charm.. thanks a lot for the quick response...