^ What's the point?
^ Properties
^ Methodes
^ Events

Download :: Topics on this subject on the Forum :: Top
TFilesProcess

A non-visual, callback event based mass file processor component with recursion.
Specify the root folder, and a filter for file names, and you get back the file names in a callback.

Features:

  • Recurse subfolders
  • Scan all drives
  • File count progress callback


Properties

  • Criteria: String: File name criteria that will be used with FindFirst(). For example: '*.txt'.

  • MediaTypes: TMediaTypes: When no Path is given the media types selected will be searched.
        mtDRIVE_REMOVABLE,  // The drive can be removed from the drive.
        mtDRIVE_FIXED,      // The disk cannot be removed from the drive.
        mtDRIVE_REMOTE,     // The drive is a remote (network) drive.
        mtDRIVE_CDROM,      // The drive is a CD-ROM drive.
        mtDRIVE_RAMDISK     // The drive is a RAM disk.
    
  • Path: String: Root folder to begin in which to begin searching for specified files. Set it to '' (none) to search the whole computer. See MediaTypes.

  • Recurse: Boolean: Go into subfolders or not.



    Methodes

  • Execute: Boolean: Start the processing task. Matches will be given in the FileProcessCallback() event.

  • Count: Int64: Perform a count task. After a count, the Execute() will be much faster due to Windows file system caching.

  • CountFiles: Integer: (Used internally.) Count the files in the specified folder and it's subfolders.

  • RecurseProcess: Integer: (Used internally.) Start the search for the files in the specified folder and it's subfolders. Matches will be given in the FileProcessCallback() event.


    Events

  • FileCountProgressCallback: Reports matching files found. Call Application.ProcessMessages inside if you don't want to freeze your program. Set Abort to True to abort the whole mass file processing task.

  • FileProcessCallback: The essential event of TFilesProcess. When a file is found that matches the Criteria the event will be called. Do what you want with the files here. You should call Application.ProcessMessages inside if you don't want to freeze your program. Set Abort to True to abort the whole mass file processing task.


    See the class's popup auto-complete menu while designing for all of it's properties/methodes...


  • [Top]