Directory: GetFiles

GetFiles

Returns a list of all the files that match a pattern within the specified directory.



 Public Function GetFiles(
	  ByRef Path As String,
	  Optional ByRef SearchPattern As String = "*",
	  Optional ByVal SearchOption As SearchOption = TopDirectoryOnly ) As String ( )

Parameters

Path
[ByRef] String. The directory to search for the matching files.
SearchPattern
[ByRef] Optional. String. A pattern to match the files against.  

Default: "*"

SearchOption
[ByVal] Optional. SearchOption. One of the enumeration values that specifies whether the search operation should include all subdirectories or only the current directory.  

Default: TopDirectoryOnly

Return Values

String() -  The list of matching file names. If no filenames matched, then an empty, zero-length array is returned.

Remarks

The path can be absolute or relative. The path is not included in the filename result.

See Also

Project CorLib Overview

Class Directory Overview