Re: files in a folder
Re: files in a folder
- Subject: Re: files in a folder
- From: "Marc K. Myers" <email@hidden>
- Date: Wed, 05 Jun 2002 01:39:56 -0400
- Organization: [very little]
>
Date: Tue, 04 Jun 2002 17:55:11 -0400
>
From: "Marc K. Myers" <email@hidden>
>
Reply-To: email@hidden
>
Organization: [very little]
>
To: email@hidden
>
Subject: Re: files in a folder
>
>
> Date: Tue, 04 Jun 2002 11:41:42 -0500
>
> Subject: files in a folder
>
> From: Rick Norman <email@hidden>
>
> To: <email@hidden>
>
>
>
> Can someone tell me or point me in the right direction for information on
>
> writing an applet to drop a folder on and have the script count the items
>
> and also set each item to a name (x, y, z) what have you. Everything I've
>
> tried thus far will only give me the path of the folder and the last item in
>
> the path is the folder name, but doesn't look inside the folder.
>
> Thanks in advance,
>
> Rick Norman
>
>
Try this:
>
>
on open (itemList)
>
set theFldr to item 1 of itemList
>
tell application "Finder"
>
set itemCnt to count items of itemList
>
repeat with anItem in itemList
>
-- do whatever you want to do with the items, such as "set name"
>
end repeat
>
end tell
>
end open
Sorry. It seems I left out a line...
on open (itemList)
set theFldr to item 1 of itemList
tell application "Finder"
set itemCnt to count items of itemList
set itemList to items of theFldr -- this is the line I left out
repeat with anItem in itemList
-- do whatever you want to do with the items, such as "set name"
end repeat
end tell
end open
Marc K. Myers <email@hidden>
http://AppleScriptsToGo.com
4020 W.220th St.
Fairview Park, OH 44126
(440) 331-1074
[6/5/02 1:39:21 AM]
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.