Filtering FIle Types

JB sundown at pacifier.com
Mon Sep 1 16:02:49 EDT 2014


If I have folder with thousands of files
I can use the Files and get a list of the
file names and it will end with the type
preceded by a dot such as .jpg.

I can set the item delimiter to “.” and do
a repeat to get the last item of each line
and I will have a list of all file types and
the name/line they are associated with.

If I want to filter the list to only include a
certain list of file types I can do a repeat
and check the type for each file name &
then provide a list of types to check such
as “png,db,gif.text” and say if if “jpg” is in
the list then do whatever like include or do
not include this file in the list.

What is the fastest way to filter a list of files
if you know the name and type of the file?
Would a regex be good for this?

John Balgenorth



More information about the use-livecode mailing list