cURL / Mailing Lists / curl-users / Single Mail


Re: Upload file only if newer

From: Dan Fandrich <>
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:
Received on 2010-09-16