curl-users
Re: Problem with special character # on target file
Date: Mon, 23 Apr 2012 15:19:24 +0200
On Mon, Apr 23, 2012 at 02:34:32PM +0200, Chenevard Alfredo wrote:
> >> I have tried everything possible so that I can create a file with a
> #. Nothing seems to work.
> I need a different remote file name as the original
> Does anyone have any idea how I can come to a result ??
>
> Request with remote file name: ga\#ga_new.txt
> /usr/local/bin/curl -v -T /tmp/ga#ga.txt -u C723576 -k
> sftp://10.152.122.14:22/tmp/ga\#ga_new.txt
> -rw-r--r-- 1 C723576 C723576 23 Apr 11 14:40 ga\
Putting the new name into the destination URL as you've done here is the
correct way to give a file a new name on upload. But, if the remote system
has a problem handling # in a file name, it's not going to work any
better than just leaving off the name. It looks very strongly that the
problem lies with the remote server.
> Request without remote file name
> /usr/local/bin/curl -v -T /tmp/ga#ga.txt -u C723576 -k
> sftp://10.152.122.14:22/tmp/
> -rw-r--r-- 1 C723576 C723576 23 Apr 11 14:40 ga#ga.txt
>>> Dan
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2012-04-23