in reply to Re: Bad file descriptor' error with automated FTP script.
in thread Bad file descriptor' error with automated FTP script.

The command "dir" gives the equalent of "ls -l" (long list) and "ls" only gives me the filename, In my script the date check is also there. As you can see the logs --"getting ...." is the file name and also in "... exists, so no need to download"

============================
Getting TTFILE008499;1 TTFILE008499 exist, So no need to download
========================

Replies are listed 'Best First'.
Re: Re: Re: Bad file descriptor' error with automated FTP script.
by castaway (Parson) on May 14, 2004 at 12:12 UTC
    I don't see you using the date/time there. (Surely that -f gets a filename?). In any case, you could check if the parsing of the dir() output is producing rubbish.

    If you need the last modification time of the file, there is also a mdtm(Filename) command which will give you that.

    Also, adding a Debug => 1 to your new() call may give some helpful clues. C.