• 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: Filtering by author and file
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Filtering by author and file


  • Subject: Re: Filtering by author and file
  • From: Philip Aker <email@hidden>
  • Date: Wed, 22 Aug 2007 15:50:26 -0700

On 2007-08-21, at 17:54:34, Luther Fuller wrote:

On Aug 21, 2007, at 7:46 PM, Michelle Steiner wrote:
It does not work if the file's name contains a space.

Mmmmm. But this does ...

on open dropList
tell application "Finder"
repeat with dropItem in dropList
if (class of item dropItem) is document file then
do shell script "mdls " & (quoted form of POSIX path of dropItem)
display dialog the result
end if
end repeat
end tell
end open


The following obtains files which have Spotlight author entries in a given directory.
Unfortunately, the listing is hardly convenient for AppleScript users.
Furthermore, mdls incorrectly errors to stdout :-(

set ppath to quoted form of (POSIX path of (path to desktop))
set dlist to {}

try
set end of dlist to (do shell script "cd " & ppath & ";mdls -name kMDItemAuthors *.pdf")
end try
try
set end of dlist to (do shell script "cd " & ppath & ";mdls -name kMDItemAuthors *.doc")
end try
try
set end of dlist to (do shell script "cd " & ppath & ";mdls -name kMDItemAuthors *.rtf")
end try
dlist


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: 
 >Filtering by author and file (From: "Ignacio Russell" <email@hidden>)
 >Re: Filtering by author and file (From: Luther Fuller <email@hidden>)
 >Re: Filtering by author and file (From: Michelle Steiner <email@hidden>)
 >Re: Filtering by author and file (From: Luther Fuller <email@hidden>)

  • Prev by Date: Re: working with records
  • Next by Date: Re: Does a filepath exist? [NOISE]
  • Previous by thread: Re: Filtering by author and file
  • Next by thread: Re: Filtering by author and file
  • Index(es):
    • Date
    • Thread