cURL / Mailing Lists / curl-users / Single Mail

curl-users

how to write to a file with # in it

From: Vijoy Varghese <vijoy_at_spectrum.net.in>
Date: Sun, 21 Aug 2005 11:13:25 +0530

Hi Friends,

I tried almost everything, every resource, trial & error... still I am stuck.

I am using cURL to copy files from one server to another. And my files contain all kind of weird
characters. Everything was working fine until the character '#' came.

curl -o /local/file#name.txt http://site.com/prog.pl?file=file%23name.txt&dir=docs/today

I am getting the data, but the name of the file on local machine will be '/local/filename.txt',
where what I want was '/local/file#name.txt'.

I tried escaping # with back slash, but no use!

Is there any way out of this problem? or is it something like 'I cant have files with # in it while
using cURL'?

Please let me know

thanks
Vijoy Varghese
Received on 2005-08-21