curl-users
Re: Automatically rename a downloaded file by curl to avoid filename conflict.
Date: Wed, 3 Feb 2010 07:46:59 -0800
hi...
don't know offhand if curl has an option to add a version number to
your output file, if an earlier version already exists...
but you can easily write a shell script/batch file to accomplish this..
good luck!
On Tue, Feb 2, 2010 at 9:27 PM, Hongyi Zhao <hongyi.zhao_at_gmail.com> wrote:
> 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
>
-------------------------------------------------------------------
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