curl-users
RE: [MAY BE SPAM] Re: Ftping a file and renaming the file at the remote server
Date: Mon, 11 Jul 2005 18:05:35 -0400
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.
Thanks,
Jaya V.
-----Original Message-----
From: curl-users-bounces_at_cool.haxx.se
[mailto:curl-users-bounces_at_cool.haxx.se] On Behalf Of Daniel Stenberg
Sent: Monday, July 11, 2005 5:35 PM
To: curl tool talk
Subject: [MAY BE SPAM] Re: Ftping a file and renaming the file at the
remote server
On Mon, 11 Jul 2005, VeeraraghJ_at_usa.redcross.org wrote:
>> RENAME $file TEST_FILE.txt
> < 500 illegal command
...
> I tried to even use -Q '-ls' even that failed..
Right, since neither "RENAME" nor "ls" are valid FTP commands.
Try this reference: http://curl.haxx.se/rfc/rfc0959.txt
Rename is done with RNFR and RNTO, while "ls" is not at all possible to
do
using the quote approach.
-- Commercial curl and libcurl Technical Support: http://haxx.se/curl.htmlReceived on 2005-07-12