DirItemize

Returns a delimited list of directories.

Syntax:

DirItemize (dir-list)

Parameters:

(s) dir-list a string containing a set of sub-directory names, which may be wildcarded.

Returns:

(s) tab delimited list of directories.

 

This function compiles a list of sub-directories and separates the names with a Tab. For more information on delimiters see File Delimiters.

This is especially useful in conjunction with the AskItemList function, which enables the user to choose an item from such a delimited list.

DirItemize("*.*") returns all sub-directories under the current directory.

Note: Some shell or file manager applications using the WIL Interpreter allow an empty string ("") to be used as the "dir-list" parameter, in which case all sub-directories highlighted in the file display are returned. However, if there are any directory names or wild cards in the string, all sub-directories matching the path names are returned, regardless of which ones are highlighted.

By default hidden and system directories are ignored. IntControl 5 can be used to control whether or not hidden directories are processed by the DirItemize function.

Example:


DirChange(DirWindows(0))
a = DirItemize("*.*")
AskItemlist("Directories", a, @TAB, @UNSORTED, @SINGLE, @FALSE)
See Also:

CurrentFile, FileItemize, AskItemList, AskFileText, IntControl 5, WinItemize, DirInfoToArray