$finddir » History » Revision 2
Revision 1 (Per Amundsen, 08/12/2015 12:39 PM) → Revision 2/8 (Per Amundsen, 08/12/2015 12:42 PM)
_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 wildcard specification and returns the full path and directory if it is found. *Parameters* dir - The directory to search. wildcard - Wildcard to search for. N - If N = 0, number of directories, otherwise the The Nth directory. directory to search for. [depth] - Maximum folder depth. (optional) [@window|command] - Custom window name or a command. (optional) *Properties* .shortfn - Return the path in a [[$shortfn|shortfn]] format. *Example* <pre> ; Print number of sub directories found in $adiircdir. //noop $finddir($mircdir,*.*,0,echo -ag $1-) ; Print all sub directories in $adiircdir, when using the command parameter, $1- will hold the path. //noop $finddir($mircdir,*.*,0,echo -ag $1-) </pre>