Re: Get info for items in a folder
Re: Get info for items in a folder
- Subject: Re: Get info for items in a folder
- From: Philip Aker <email@hidden>
- Date: Sun, 21 Oct 2007 02:48:14 -0700
On 2007-20-10, at 15:49, Joe wrote:
I am trying to write a script that will let me crawl through the contents of a folder returning some information about each item contained therein.
Depending on what you need, MetaData.osax < http://www.vcn.bc.ca/~philip/> can deliver in a reasonable amount of time and report only specific types of info:
set res to {} set dirs to "~" set flist to md query "kMDItemFSName=='*.jpg'" in directories dirs reporting kMDItemPath repeat with f in flist set end of res to kMDItemPath of f end repeat res
The md show dictionary command gives the complete list (~ 120) of the information properties available. It can deal with tilde expansion in directory or file names -- i.e. "~" is the same as "path to home folder" etc. This example will return all the info it knows about for each .jpg in the target directory:
set dirs to path to home folder md query "kMDItemFSName=='*.jpg'" in directories dirs
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden