meta data for this page
  •  

ibec_GetFiles

Retrieves specified file or list of files.

Description

No additional description…

Syntax

  function ibec_GetFiles(files_list, 'path'\, 'file_name', _gfXXX + __gfXXX);
 
  There are six __gfXXX constants:
  
  __gfRecursiveSearch	The search will be performed recursively for each directory. For example, if D:\ is specified as the initial 
  path for the search, the function will search also in D:\MyData, in D:\MyPhotos, in D:\MyPhotos\Last etc. In this case the entire 
  D: drive will be scanned.
  ---------------------------------------------------------------------------------------------------------------------------------
  __gfFullName	The file names in the result list will include the full path, otherwise only the file name (without the drive 
  letter and directories) will be listed.
  ---------------------------------------------------------------------------------------------------------------------------------
  __gfAppend	This is useful when you perform several searches one by one with different conditions. If this option is specified the 
  function will NOT clear the result list before performing a new search, new results will be added to the files_list. Otherwise the 
  files_list variable will be erased before searching.
  ---------------------------------------------------------------------------------------------------------------------------------
  __gfSort	This allows you to sort a list of files.
  ---------------------------------------------------------------------------------------------------------------------------------
  __gfDirectories	Use this option to get the list of subdirectories instead of the files.
  ---------------------------------------------------------------------------------------------------------------------------------
  __gfUTF8	The __gfUTF8 option returns a list of files/directories in UTF8. Mask and Path parameters can be also specified in 
  UTF8. The necessary checks and conversion are performed automatically.
  Please note that the PATH parameter should be suffixed with a backward slash (\), otherwise it will return NULL.

Example 1

 ibec_GetFiles(FilesLst, 'D:\MyData', '*.*', __gfFullName + __gfRecursiveSearch + __gfSort);

Example 2

 DirCount =  ibec_GetFiles(DirList, 'D:\MyData\', '*.*', __gfSort + __gfFullName + __gfDirectories);

Example 3

 ibec_GetFiles(Dirs, 'D:\Pictures\', '*.*', __gfSort + __gfDirectories + __gfFullName + __gfUTF8);