Project

General

Profile

$finddir » History » Version 2

Per Amundsen, 08/12/2015 12:42 PM

1 1 Per Amundsen
_Added in 1.9.0_
2
3
*$finddir(dir,wildcard,N,[depth],[@window|command])*
4
5
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.
6
7
*Parameters*
8
9
dir - The directory to search.
10
wildcard - Wildcard to search for.
11 2 Per Amundsen
N - If N = 0, number of directories, otherwise the Nth directory.
12 1 Per Amundsen
[depth] - Maximum folder depth. (optional)
13
[@window|command] - Custom window name or a command. (optional)
14
15
*Properties*
16
17
.shortfn - Return the path in a [[$shortfn|shortfn]] format.
18 2 Per Amundsen
19
*Example*
20
21
<pre>
22
; Print number of sub directories found in $adiircdir.
23
//noop $finddir($mircdir,*.*,0,echo -ag $1-)
24
25
; Print all sub directories in $adiircdir, when using the command parameter, $1- will hold the path.
26
//noop $finddir($mircdir,*.*,0,echo -ag $1-)
27
</pre>