Примеры Find First, Find Next, Find Close

Top  

 

Function void exampleFindFirst()

#macro

String CurrPath;

String CurrFile;

CurrPath = DirectoryGetCurrent()+"\*.*";       // поиск файлов в текущем каталоге

if ( FileFindFirst( CurrPath)==0) then           // каталог не пуст ?

            CurrFile = FileNameFound();                      // имя первого найденного файла

            MessageBox ( CurrFile,CurrPath);

            while ( FileFindNext() == 0)                 // поиск следующих файлов

                        CurrFile = FileNameFound();

                        MessageBox ( CurrFile,CurrPath);

            end

end

 

FileFindClose ();

End