Re: Mac file types

2000-07-26 Thread Geoff Canyon

Kevin Miller [EMAIL PROTECTED] said, on 7/26/00 3:31 AM:

 such a suffix), I don't have a good way of making sure that a file is
 an image file on a Mac before trying to use it's name as the fileName
 of my image object.  Is there any way to do this?

Not that I'm aware of.  You might be able to do this with AppleScript in the
Externals - does anyone know if this is possible in AppleScript and what
would be the syntax?

set theFile to choose file  --pick a file
tell application "Finder"
set theType to the file type of theFile
set theCreator to the creator type of theFile
end tell

--with paths it would be:

tell application "Finder"
set theType to the file type of file thePath
set theCreator to the creator type of file thePath
end tell

Archives: http://www.mail-archive.com/metacard%40lists.best.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to [EMAIL PROTECTED], not this list.




Mac file types

2000-07-25 Thread David C. Tremmel

Is it possible to determine the type of a file on the MacOS?  I have 
tried looking in the help docs and in the archives.  I did find where 
Scott mentioned that you had to check if files had a certain type, 
but I can't figure out how this could be done.  I know how to filter 
the answer file dialog to only show certain types of files, but I 
would like to filter the file list before displaying it to the user 
in the application I'm working on.  I can use the filter command to 
check for certain text in the file name, but can't come up with a way 
to determine the Mac OS file type of individual files.  Can this be 
done?

Dave Tremmel
-- 

*
David Tremmel
Assistant Director, Phytotron

Duke University
Phytotron Bldg.
Box 90340
Durham, NC  27708-0340

Phone:  (919) 660-7415
FAX:(919) 660-7425
E-mail: [EMAIL PROTECTED]

Archives: http://www.mail-archive.com/metacard%40lists.best.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to [EMAIL PROTECTED], not this list.