cURL / Mailing Lists / curl-users / Single Mail


RE: Upload file only if newer

From: Young,Jim <>
Date: Wed, 15 Sep 2010 11:14:09 -0500

R van der Veen 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.

Jim Young

CONFIDENTIALITY NOTICE This message and any included attachments are from Cerner Corporation and are intended only for the addressee. The information contained in this message is confidential and may constitute inside or non-public information under international, federal, or state securities laws. Unauthorized forwarding, printing, copying, distribution, or use of such information is strictly prohibited and may be unlawful. If you are not the addressee, please promptly delete this message and notify the sender of the delivery error by e-mail or you may call Cerner's corporate offices in Kansas City, Missouri, U.S.A at (+1) (816)221-1024.
List admin:
Received on 2010-09-15