• 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 type of selected finder item
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: get type of selected finder item


  • Subject: Re: get type of selected finder item
  • From: Michelle Steiner <email@hidden>
  • Date: Thu, 23 Apr 2009 08:56:17 -0700


On Apr 23, 2009, at 8:33 AM, Tobias Exner wrote:

Any ideas...?

tell application "Finder"
set this_item to the selection as alias
if kind of this_item is "folder" then
display dialog "It's a folder."
else
display dialog "It's a file."
end if
end tell

This assumes that all Finder items are either files or folders.

Also, the script would need to be modified to account for multiple items in the selection.

-- Michelle

-- 
Reading computer manuals without the hardware is as frustrating as reading sex manuals without the software.
-- Clarke's sixth law

 _______________________________________________
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 type of selected finder item (From: Tobias Exner <email@hidden>)

  • Prev by Date: Re: get type of selected finder item
  • Next by Date: Re: get type of selected finder item
  • Previous by thread: Re: get type of selected finder item
  • Next by thread: Re: get type of selected finder item
  • Index(es):
    • Date
    • Thread