Kerry,

I assume that you are asking for a way in a single call to get just the ones you want. I don't know of a syntax to do that.

I would just do the baFileList with *.* to get all the files, then run a simple loop building up a new list of files that end in .jpg or .bmp:

fullList = baFileList(pPath, "*.*")
listOfJpgsAndBmps = []
nFiles = count(fullList)
repeat with i = 1 to nFiles
  theFileName = fullList[i]
  last4chars = <grab the last four chars of theFileName>
  if (last4chars = ".bmp") or (last4chars = ".jpg") then
    append(listOfJpgsAndBmps, theFileName
  end if
end repeat


At 1:18 PM -0400 7/29/05, Kerry Thompson wrote:
Is there a way to get a list of two kinds of files with baFileList()?

I want to get a list of all the .jpg and .bmp files in a folder. It
looks like I can do one or the other.

baFileList(pPath, "*.jpg") gives me the jpegs. baFileList(pPath, "*.jpg,
*.bmp") returns [].

I can build the list by doing baFileList twice. It would be kinda nice
to just do it once, though.

Cordially,

Kerry Thompson


[To remove yourself from this list, or to change to digest mode, go to http://www.penworks.com/lingo-l.cgi To post messages to the list, email [email protected] (Problems, email [EMAIL PROTECTED]). Lingo-L is for learning and helping with programming Lingo. Thanks!]


--

Multimedia Wrangler.
[To remove yourself from this list, or to change to digest mode, go to 
http://www.penworks.com/lingo-l.cgi  To post messages to the list, email 
[email protected]  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]

Reply via email to