Re: How do I get "Type of file"
Re: How do I get "Type of file"
- Subject: Re: How do I get "Type of file"
- From: Gnarlodious <email@hidden>
- Date: Fri, 7 Jul 2006 11:51:51 -0600
Here is an all purpose script I use to get file info:
try
tell application "Finder" to item 1 of (selection as list) as alias
on error
choose file with prompt "Get information for which file:"
end try
copy (info for the result) to fileInfoRecord
tell fileInfoRecord
copy "File Name: " & name & return to resultStr
copy resultStr & "Created: " & creation date & return to resultStr
copy resultStr & "Modified: " & modification date & return to resultStr
copy resultStr & "Size: " & (size as integer) & " bytes" & return to resultStr
copy resultStr & "File Creator: " & file creator & return to resultStr
copy resultStr & "File Type: " & file type & return to resultStr
end tell
display dialog resultStr buttons {"Clipboard", "OK"} default button 2
if the button returned of the result is "Clipboard" then set the
clipboard to resultStr
-- Gnarlie
On 7/6/06, Patrik B. <email@hidden> wrote:
Hi,
I am trying to write a script that lets me select only certain files. What I
am missing is were do I get the names of the different file types from?
Any idea?
My code this far goes something like this.
property type_lst: {"IDd3"}
set myselection to choose from file of type type_lst
I am trying to replace the above "IDd3" with the proper code for Indesign
Interchange files also referred to as INX files.
Anyway if I could just figure out how to get the file type for any type of
file this would probably help me more than just the proper code for this one
instance.
Best, Patrik
_______________________________________________
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
_______________________________________________
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