• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Get info for items in a folder
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


Philip Aker
email@hidden



 _______________________________________________
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

References: 
 >Get info for items in a folder (From: Joe <email@hidden>)

  • Prev by Date: Re: Get info for items in a folder
  • Next by Date: Force Finder to open a package window
  • Previous by thread: Re: Get info for items in a folder
  • Next by thread: Force Finder to open a package window
  • Index(es):
    • Date
    • Thread