AppCtrlScript

MAY Computer

Help

COUNTFILES

Applies to  

AppCtrlScript (Module: wmACScr1.dll)

Group  

File

See also  

ANYFILEFOUND, IF

Stores the number of files found in the specified folder matching the specified file pattern in a script variable. If the file pattern is not specified then "*.*" is assumed. By default subfolders are not processed. Similar to ANYFILEFOUND which is quicklier if you only want to know if at least one file exists.

Syntax

COUNTFILES <VariableName>, <Path>[, <Pattern>][, <SubFolders>][, <MaxFiles>] 

Part

Description

<VariableName>

Name of the variable where to store the number of found files.

<Path> Folder name
<Pattern> Optional file pattern (* and ? can be used). If missing then *.* is the default.
<SubFolders> Optional 0|1; if 1 then subfolders are searched too. Default is 0.
<MaxFiles> Optional maximum number of files to count. 0 means no limitation and is the default but it can increase performance for large folders to set it to a number that is sufficient for your application. Setting to 1 produces the same result as the ANYFILEFOUND command.