_Added in 1.9.0_
*$finddir(dir,wildcard,N,[depth],[@window|command])*
Searches the specified directory and its sub directories for the Nth directory name matching the [[Scripting_Wildcards|wildcard]] specification and returns the full path and directory if it is found.
_If [[/halt]] is used in the [command], the search is halted instead of the entire script._
*Parameters*
table(ktable).
|*Parameter*|*Description*|
| dir | The directory to search. |
| wildcard | [[Scripting_Wildcards
; Print number of sub directories found in $adiircdir. //echo -ag $finddir($adiircdir,*.*,0) ; Print the 1st directory found. //echo -ag $finddir($adiircdir,*.*,1) ; Print all sub directories in $adiircdir, when using the command parameter, $1- will hold the path. //noop $finddir($adiircdir,*.*,0,echo -ag $1-)