On 25/7/00 4:23 pm, David C. Tremmel <[EMAIL PROTECTED]> wrote:

> 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?

Yes, you filter a similar way to the way you do on Windows, e.g.:

if the platform is "MacOS" then
  put "MSTKSTAKTEXT" into tFilter --hc, mc and text documents
else
  --put your windows string in here
end if
answer file "Open stack:" with filter tFilter

Regards,

Kevin

> Dave Tremmel

Kevin Miller <[EMAIL PROTECTED]> <http://www.runrev.com/>
Runtime Revolution Limited (formerly Cross Worlds Computing).
Tel: +44 (0)131 672 2909.  Fax: +44 (0)1639 830 707.


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.

Reply via email to