cURL / Mailing Lists / curl-users / Single Mail

curl-users

RE: [MAY BE SPAM] Re: Ftping a file and renaming the file at the remote server

From: <VeeraraghJ_at_usa.redcross.org>
Date: Tue, 12 Jul 2005 10:05:06 -0400

It worked! Thank you!

Thanks,
Jaya V.

-----Original Message-----
From: curl-users-bounces_at_cool.haxx.se
[mailto:curl-users-bounces_at_cool.haxx.se] On Behalf Of Dan Fandrich
Sent: Monday, July 11, 2005 6:45 PM
To: curl-users_at_cool.haxx.se
Subject: Re: [MAY BE SPAM] Re: Ftping a file and renaming the file at
the remote server

On Mon, Jul 11, 2005 at 06:05:35PM -0400, VeeraraghJ_at_usa.redcross.org
wrote:
> Hi I have been able to rename a file in the remote server> Thank you!

> However I had this problem If I had
> new_file =`date '+%H%S'`$file
> curl --insecure --verbose --disable-epsv -B -Q "-RNFR $file" -Q
"-RNTO
> $new_file" --ftp-ssl -T $WORKDIR$file -u $USERID:$PASSWD $FSECURELOC
>
> The value for $new_file was not being translated ..I got the error
> that the paramenter for RNTO was not given.
>
> However if I gave the same as
> curl --insecure --verbose --disable-epsv -B -Q "-RNFR $file" -Q
> "-RNTO `date '+%H%S'`$file" --ftp-ssl -T $WORKDIR$file -u $USERID:$
> PASSWD $FSECURELOC
>
> Is there any spefic reason why I could not use a variable in RNTO?? I
> did not have the proble at RNFR.

The variable expansion is being done by the shell, not by curl, so it
failing isn't a curl problem. In the example you gave, you have a space
before and after new_file when setting it. That would cause the Bourne
shell to fail to parse it. Try replacing curl in your command-line with
echo to see how the shell is doing variable replacement.

>>> Dan

-- 
http://www.MoveAnnouncer.com              The web change of address
service
          Let webmasters know that your web site has moved
Received on 2005-07-12