cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-users Mailing List Archives

Automatically rename a downloaded file by curl to avoid filename conflict.

From: Hongyi Zhao <hongyi.zhao_at_gmail.com>
Date: Wed, 03 Feb 2010 13:27:35 +0800

Hi all,

When I download a file by curl, I use -o switch to write the file as a
local file, say, file1.me. The issue is: if a file with the same
filename already exists in the target folder, the original file will
be overwrited. So, how can I let curl automatically rename a
downloaded file to avoid filename conflict in the above case?

Thanks in advance.

-- 
.: Hongyi Zhao [ hongyi.zhao AT gmail.com ] Free as in Freedom :.
-------------------------------------------------------------------
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 2010-02-03

These mail archives are generated by hypermail.

donate! Page updated November 12, 2010.
web site info

File upload with ASP.NET