Re: match in a list
Re: match in a list
- Subject: Re: match in a list
- From: Christopher Nebel <email@hidden>
- Date: Fri, 19 Jul 2002 02:10:33 -0700
On Thursday, July 18, 2002, at 09:10 PM, Zimba wrote:
how can I write this the proper way:move (every file of theFolder whose
name ends with item in image_extension_list) to (folder "images" of
theFolder) with replacing
I'd like to avoid a loop to check if the name contains one of the
extension in the image_extension_list, is there a way?
There's no way to do the general case of that without a loop, as far as
I know. However, since you're looking at the extension, you can cheat
if you're using Mac OS X. The Mac OS X Finder defines a "name
extension" property for items. You can therefore say something like
this:
set image_extension_list to {"jpg", "tiff", "gif"}
tell theFolder
move every file whose name extension is in
image_extension_list to folder "images"
end
--Chris Nebel
AppleScript Engineering
_______________________________________________
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.