multidiskscanner ExcludeList property
TDiskScanList Example
Return to Introduction  Previous page  Next page
Applies to
dcMultiDiskScanner component.  

property ExcludeList: TDiskScanList// TList  

The ExcludeList property is the list of searching rules that defines the locations and searching masks which you would like to exclude from search results.  
You can set the excluding rules either at design and run-time of your application.  
The ExcludeList property has the TDiskScanList type. To add the new rule to ExcludeList at run-time - call ExcludeList.AddPath(LocationIncludeSubfolders) method. To clear the list - call ExcludeList.Clear method. Please see an example for more details.  

tip Setting the full path name to the excluding rules is not necessarily. For example, if you would like to exclude just some file types (extenstions), you may specify these extensions without path information (i.e: "*.bmp" will exclude ALL bitmaps from the search results):  
  ExcludeList.AddPath('*.bmp', False);  
Plues, if the path information is not specified, the dcMultiDiskScanner will NOT search ANY folders to prepare list of previously excluded files before actual searching.  
For example, you would like to find all files in root folder on disk C:  
  IncludeList.Clear;  // clear list  
  IncludeList.AddPath('c:\*.*', True);  
but would like to exclude all BMPs:  
  ExcludeList.AddPath('*.bmp', True);  
//                    ^-- if you specify the path  
// here, i.e: "C:\*.*", the dcMultiDiskScanner will  
// scan entire disk to exclude files before actual  
// search, and will take a lot of time to prepare  
// the pre-excluded list  

tip However, if you want to exclude files only from certain directories, you must specify the path. For example, to exclude all BMP-files from, let's say, "C:\Bitmaps" directory, you must speify following exclude:  
  ExcludeList.AddPath('C:\Bitmaps\*.bmp', True);  

See also
IncludeList property.