cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Something Stpid?

From: Charlie Bursell <charlie.Bursell_at_quovadx.com>
Date: Wed, 20 Jun 2007 08:49:01 -0600

> If I insert the command "$curlHandle reset" (See Below) prior to
each
> iteration of th e foreach loop, it works as expected.
>
> Should I have to do this?

Or maybe just set -ftplistonly back to zero?

 - Jeff

------------------------------
I guess since I misspelled Stupid in the original I need to keep it that
way :-)

Thanks, that seems to work but begs another question? I thought since I
had not set ftplistonly when getting the files it would default to 0.
It seems the library remembers any previous settings unless specifically
unset?

Then the question is, when getting a listing and using that list to
download files, how many of the previous configuration values have to be
reused?

For example, if while doing the list I set the following:
$curlHandle configure -url ftp://10.10.170.62/%2fsomewhere/somedir/ \
                    -userpwd login:password \
                    -ftpresponsetimeout 20 \
                    -ftplistonly 1 \
                    -bodyvar fileList \
                    -errorbuffer ERRORBUFFER

Then when getting the files are several of the following settings
superfluous, e.g., -userpwd, etc.?

$curlHandle configure -url ftp://10.10.170.62/%2fsomewhere/somedir/$file
\
                    -userpwd login:password \
                    -ftpresponsetimeout 20 \
                    -ftplistonly 0 \
                    -bodyvar txtFile \
                    -errorbuffer ERRORBUFFER

Also since the library remembers the directory it was in, is there a way
to download the file without providing the full path name, e.g.,
        -url ftp://10.10.170.62/$file \

I'm sorry if some of these questions seem rather basic, but I am still
trying to get the hang of this.

Charlie
Received on 2007-06-20