The SDL Component Suite is an industry leading collection of components supporting scientific and engineering computing. Please visit the SDL Web site for more information....



CountFiles


Unit:SDL_filesys
Class: none
Declaration: function CountFiles (FileMask: string; SubDirs: boolean; Feedback: TScanFilesFeedback): integer;

The function CountFiles counts the files whose name match the parameter FileMask. The search starts at the path specified by FileMask and recursively searches all subdirectories if the parameter SubDirs is TRUE.

The parameter FileMask may contains wildcards in the filename and extension but not in the path. The parameter FeedBack defines the feeback routine which is called whenever a subdirectory is entered during recursive search. If no feedback should be given, FeedBack should be set to nil.

The function returns the number of files which match the search criteria.



Last Update: 2013-Sep-20