ListDirectories Procedure

Lists all the subdirectories in a given directory. Use ListFiles to list all of the files.
Declaration
function ListDirectories(path as String) as List of String

Parameters

Return value

List of String — List of subdirectory paths.

Possible error codes

Example

Code
CreateDirectory PathCombine(["testdir", "subdir1"])
CreateDirectory PathCombine(["testdir", "subdir2"])
WriteFileText PathCombine(["testdir", "file1"]), "111"
WriteFileText PathCombine(["testdir", "file2"]), "222"
WriteFileText PathCombine(["testdir", "file3"]), "333"
print "Num dirs: "; Len(ListDirectories("testdir"))
print "Num files: "; Len(ListFiles("testdir"))
DeleteDirectory "testdir", true
Output
Num dirs: 2
Num files: 3