• 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: Getting info for files in Finder selection
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Getting info for files in Finder selection


  • Subject: Re: Getting info for files in Finder selection
  • From: pete boardman <email@hidden>
  • Date: Fri, 13 May 2005 16:41:44 +0100

On 2005-05-13, at 15:20, Le Stang Jean-Baptiste wrote:

Well i think this is a problem between what Applescript calls a file and what the FInder calls a file, same term but different meanings :

tell application "Finder" -- Tiger 10.4.
    set theSelection to selection
    repeat with i in theSelection
        set fi to info for (i as alias)
    end repeat
end tell

That's the one!

On 2005-05-13, at 15:17, Stephen Jonke wrote:
I think you are looking for this:

  tell application "Finder"
    set theSelection to selection
    repeat with i in theSelection
      set fi to properties of i
    end repeat
  end tell

That's the one too!

It's interesting to compare the information returned by these two for the same file. From info for you get:

name:"Send Registration.setup", creation date:date "Friday, 6 May 2005 16:10:29", modification date:date "Friday, 6 May 2005 16:10:29", icon position:{0, 0}, size:1051.0, folder:false, alias:false, package folder:false, visible:true, extension hidden:false, name extension:"setup", displayed name:"Send Registration.setup", default application:alias "Macintosh HD:System:Library:CoreServices:Setup Assistant.app:", kind:"Setup Assistant Document", file type:"file creator:"type identifier:"dyn.age81g3pysz2a", locked:false, busy status:false, short version:"", long version:""

(this doesn't copy accurately from Script Editor?...), whereas properties gives you more, including the file type and creator:

{class:alias file, name:"Send Registration", index:13, displayed name:"Send Registration", name extension:"", extension hidden:false, container:folder "pete" of folder "Users" of startup disk, disk:startup disk, position:{-1, -1}, desktop position:missing value, bounds:{-33, -33, 31, 31}, kind:"Alias", label index:0, locked:false, description:missing value, comment:"", size:63.0, physical size: 4096.0, creation date:date "Friday, 6 May 2005 16:10:29", modification date:date "Friday, 6 May 2005 16:10:29", icon:missing value, URL:"file://localhost/Users/pete/Send Registration", owner:"root", group:"pete", owner privileges:read write, group privileges:read only, everyones privileges:read only, file type:"slnk", creator type:"rhap", stationery:false, product version:"", version:"", original item:document file "Send Registration.setup" of folder "Assistants" of folder "Library" of folder "pete" of folder "Users" of startup disk}

But now I know how to get at all this info, anway. Thanks!

Pete
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Getting info for files in Finder selection
      • From: Stephen Jonke <email@hidden>
References: 
 >Getting info for files in Finder selection (From: pete boardman <email@hidden>)
 >Re: Getting info for files in Finder selection (From: Le Stang Jean-Baptiste <email@hidden>)

  • Prev by Date: Propmpting user to enter Variables
  • Next by Date: Re: Folder Action Script: Detect a certain Volume in /Volumes
  • Previous by thread: Re: Getting info for files in Finder selection
  • Next by thread: Re: Getting info for files in Finder selection
  • Index(es):
    • Date
    • Thread