MACSCRPT Archives

August 2007

MACSCRPT@LISTSERV.DARTMOUTH.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
jeff donovan <[log in to unmask]>
Reply To:
Macintosh Scripting Systems <[log in to unmask]>
Date:
Tue, 14 Aug 2007 12:55:49 -0400
Content-Type:
text/plain
Parts/Attachments:
text/plain (46 lines)
On Aug 14, 2007, at 11:58 AM, Bill White wrote:

> On 8/14/07 11:46 AM, jeff donovan <[log in to unmask]> wrote:
>
>> Can someone give me some guidance on how i can have a script read a
>> file list of names and create a folder with that name?
>>
>> example
>> read file list1
>> list1 contains ( bob, joe, doc, foo )
>>
>> make new folder for each name
>
> Jeff,
>
> Simplistically, something like this does it:
>
> set folderNames to {"bob", "joe", "doc", "foo"}
>
> repeat with aName in folderNames
>
>     tell application "Finder"
>
>         make new folder with properties {name:aName}
>
>     end tell
>
> end repeat
>
> This will create four folders on the desktop (there's no error- 
> checking to
> see if folders with these names already exist there). It's an easy  
> tweak to
> have them created somewhere else.
>
> Hope that helps,
>
> Bill
>

thanks for the reply Bill,

yes close. How can I

set folderNames to ( read from file.txt ) ?

ATOM RSS1 RSS2