怎样获得指定目录下的mdb文件的全部文件名及总数?

解决方案 »

  1.   

    用findFirstFile() 和FindNextFile()函数.
      

  2.   

    以上是API的方法,
    另一种方法是:
    用FileListBox1实现.定义filter,然后判断FileListBox1的行count数,和每一行的值.(就是全部文件名.)
      

  3.   

    FileListBox1.mask:= '*.mdb'
    总数为:=FileListBox1.Items.Count
    for i:= 0 to FileListBox1.Items.Count -1 do
    begin
      文件名:=FileListBox1.Items.string[i]
    end;