cURL / Mailing Lists / curl-users / Single Mail

curl-users

RE: Uploading multiple files

From: Bill Mercer <bmerc_at_nccer.org>
Date: Sun, 26 Jun 2005 15:49:17 -0400

>The issue is that I have a large and dynamic list of files is my local
directory.
>I can't possibly create a single command for all of them.

You don't have to, you let the computer do it for you. This is why the
FOR command
ws created.

Go to a dos prompt, and type HELP FOR to see all the options you can
use with the FOR command.

Here's a simple example of a batch file that will upload all files in a
folder with the extention .dat to an FTP server.

CD C:\data
for %%f in (*.dat) do @curl -T %%f ftp://your.ftp.server/%%f

Cheers,

Bill Mercer - National Center for Construction Education and Research
3600 NW 43rd St
Gainesville, Florida 32606
http://www.nccer.org
Phone 352-334-0911 Fax 352-334-0932
=============================================

                                       
Received on 2005-06-26