cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: multiple upload

From: Bill Mercer <bmerc_at_nccer.org>
Date: Wed, 23 Feb 2005 12:38:46 -0500

I've never used curl with applescript, but the concept of doing something to each file in a folder is pretty common. Here's a very simple and UNTESTED example applescript that may help you figure out how to do what you want.

-- prompt user to select a folder
set theFolder to choose folder with prompt "Select folder to scan:"

-- read the list of filenames from that folder
set theFileNames to list folder theFolder

-- for each file in the list, upload the file.
repeat with theFile in theFileNames
  set thisFile to (theFolder as string) & contents of theFile
-- ********************************
-- whatever is in here will be done once for each file in the folder.
-- change this to match your specific curl command line stuff
set theCommandLine to "/path/to/curl --options " & thisFile
do shell script theCommandLine

-- ********************************
end repeat

>>>> coo_at_email.it 02/23/05 05:38AM >>>
>Hallo,
>I'm trying to use curl with applescript.
>I need to upload multiple files.
>But I can't specify all singles files.
>I would set a folder, and then upload all files that are in the folder.
>
>Can I do that???
>
>Thanks
>

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-02-23