FindAllDirs
InstallShield 2022 » InstallScript Language Reference
The FindAllDirs function searches an entire hierarchical disk or directory structure starting with the specified directory, and it returns a string list of subdirectory names. You can use FindAllDirs to find either subdirectories of a certain directory, or you can use it to find all the directories on a disk.
If nOp is INCLUDE_SUBDIR, the search starts at the directory specified by szDir and continues searching the subdirectory structure. If the specified directory is a root directory and nOp contains INCLUDE_SUBDIR, all the directory names on the entire disk are returned.
Syntax
FindAllDirs ( szDir, nOp, listDirs );
Parameters
| Parameter | Description | ||||||
| szDir | Specifies the name of the directory to search. Note:If the directory is enclosed in quotation marks, FindAllDirs fails. To ensure that the folder name is not enclosed in quotation marks, call LongPathToQuote (szPath, FALSE) before calling FindAllDirs. | ||||||
| nOp | Specifies whether or not to search all of the subdirectories below szDir. Pass one of the following predefined constants in this parameter: 
 
 | ||||||
| listDirs | Returns a list of fully qualified directory names. The string list identified by listDirs must already have been initialized by a call to ListCreate. | 
Return Values
| Return Value | Description | 
| 0 | FindAllDirs successfully generated the list of subdirectory names. | 
| < 0 | FindAllDirs function was unable to generate a list. | 
See Also