cURL / Mailing Lists / curl-users / Single Mail


RE: Download multiple files from ftp

From: Young,Jim <>
Date: Thu, 3 Oct 2013 13:21:16 +0000

Michele Mor wrote:

> The problem is that the file on ftp site changes name everyday.
> For example, the file name is ce2013-10-03-10.14.02.sql.gz and everyday the final part of the file changes.
> Since curl does not accept wildcards, how can I download my file without editing my batch file everyday?

I have similar a problem and have solved it by having my script call curl to list out the file(s) available for download and save that list in a file. Then the script loops through the list and downloads the files one by one.

> In addition, I need to save that file in a specific directory, but my guess is that I can simply use:
> -o "F:\Backup\website-db\

I think you need a file name added to the directory path. e.g. -o "F:\Backup\website-db\outFile.sql.gz"

An alternative might also be to do this:

         cd F:\Backup\website-db\
         curl .... -O

where the -O option with use the file name of the file you're downloading.

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 2013-10-03