Thanks for the answer, Kevin.  I guess I wasn't clear about what I 
was trying to do.  I know about what you pointed out (basically 
filtering the answer file dialog).  I want to do something like the 
following:

get the files of type "MSTKSTAKTEXT"
put it into fld AvailableFiles

or get the file type of an individual file, something like:

get the fileType of file "/HD/MyFolder/MyFile"

I know the above syntax doesn't work, since fileType is simply a 
global property that sets the file type for files saved from a stack. 
But you get the idea.  The reason for this is that I want to show the 
user a filtered list of the files in the current directory OR I want 
to automatically load/display the next image in a series (as 
determined by the file name) from the current directory (basically I 
can sort the directory contents to determine the order of the 
images).  The problem is that, while on Windows I can be reasonably 
sure images will have either *.gif or *.jpg filenames (so I can make 
sure I only try to set the fileName of my image object to a file with 
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?

Dave Tremmel


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


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