In that case, the new filter command lets you put the output into a second variable:
filter lines of tFiles with regex pattern ".*\.jpg|png" into tFilteredFiles That way, tFiles will not be changed and tFilteredFiles will contain the result of the filter command Pete lcSQL Software <http://www.lcsql.com> Home of lcStackBrowser <http://www.lcsql.com/lcstackbrowser.html> and SQLiteAdmin <http://www.lcsql.com/sqliteadmin.html> On Tue, Sep 2, 2014 at 10:14 AM, JB <sund...@pacifier.com> wrote: > Thank you for the reply and code. > > If I call it for every type I want then > I will need to splice it back together > with the other types I filtered after I > am done calling for each type. > > I guess there comes a point when I > have added a certain amount of types > it will be faster to do one line at a time. > > Thank you for the code! > > John Balgenorth > > > On Sep 2, 2014, at 5:17 AM, Peter M. Brigham <pmb...@gmail.com> wrote: > > > you can use the following: > > > > function filterByType pFileList, pType > > -- assuming pType is of the form "jpg" or "png" > > filter pFileList by ("*." & pType) > > return pFileList > > end filterByType > > > > and call it repeatedly for whatever file types you want. > > > > -- Peter > > > > Peter M. Brigham > > pmb...@gmail.com > > http://home.comcast.net/~pmbrig > > > > > > On Sep 1, 2014, at 4:28 PM, JB wrote: > > > >> I have not tried it yet but if it works > >> the problem is I might want to use > >> a variety of file types so the repeat > >> would filter one line at a time and > >> then you check for that type in the > >> list of types you will allow. > >> > >> The way you provided would need it > >> to allow a list of types or I would need > >> to keep filtering so there might be a > >> faster way but I am not sure. > >> > >> Thank you for the reply and code advice. > >> > >> John Balgenorth > >> > >> > >> On Sep 1, 2014, at 1:24 PM, Martin Koob <mk...@rogers.com> wrote: > >> > >>> > >>> I think you can use the filter command with a wildcard and your > extension. > >>> Put your folder path into tMyFolderPath then: > >>> > >>> set the folder to tMyFolderPath > >>> put the files into theFiles > >>> filter theFiles with "*.jpg" > >>> > >>> Martin > >>> > >>> > >>> > >>> -- > >>> View this message in context: > http://runtime-revolution.278305.n4.nabble.com/Filtering-FIle-Types-tp4682777p4682778.html > >>> Sent from the Revolution - User mailing list archive at Nabble.com. > >>> > >>> _______________________________________________ > >>> use-livecode mailing list > >>> use-livecode@lists.runrev.com > >>> Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > >>> http://lists.runrev.com/mailman/listinfo/use-livecode > >>> > >> > >> > >> _______________________________________________ > >> use-livecode mailing list > >> use-livecode@lists.runrev.com > >> Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > >> http://lists.runrev.com/mailman/listinfo/use-livecode > > > > > > _______________________________________________ > > use-livecode mailing list > > use-livecode@lists.runrev.com > > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > > http://lists.runrev.com/mailman/listinfo/use-livecode > > > > > _______________________________________________ > use-livecode mailing list > use-livecode@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > _______________________________________________ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode