curl-library
Re: Renaming files with sftp
From: Nick Zitzmann <nick_at_chronosnet.com>
Date: Wed, 18 Jul 2007 16:13:11 -0600
Date: Wed, 18 Jul 2007 16:13:11 -0600
On Jul 18, 2007, at 3:42 PM, Joe Ebmeier wrote:
> Using ftp, the file gets renamed as expected. But when I switch to
> sftp, I get no errors but the file is not renamed. I am running
> curl 7.16.4 on a linux machine. Any ideas what is wrong?
1. Unless things have changed since I originally wrote the code, SFTP
ignores CURLOPT_QUOTE and only pays attention to CURLOPT_POSTQUOTE.
2. The SFTP syntax for renaming files is different from FTP. On FTP
you'd send the raw FTP commands to rename the file, but since SFTP is
a binary protocol, we settled on using OpenSSH's SFTP command line
syntax instead.
Nick Zitzmann
<http://www.chronosnet.com/>
Received on 2007-07-19