curl-users
Re: Upload file only if newer
Date: Wed, 15 Sep 2010 15:54:34 -0700
On Wed, Sep 15, 2010 at 11:14:09AM -0500, Young,Jim wrote:
> >I just want to find out if it is possible to use CURL only to upload/overwrite a file if it is newer than the file on the >server.
> >curl -T /localpath/localfile ftp://user:password@servername
> >just overrides the existing file.
>
> I would do this with a script that first lists the file on the remote server and parses it's date from the output. The script can then decide to upload or not based on the results.
The manual isn't clear on if it applies to uploads, but the --time-cond
option might accomplish this.
>>> 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 2010-09-16