string GetDirContents(string,string)
Return Type: string
Parameters: string sDir, string sDelim
Description:
GetDirContents retrieves the contents of a directory. The contents of the directory
can be filtered for a particular kind of file by using wildcards (*) in the
sDir parameter. For example:
sDir = "c:\\windows\\*.*" returns all files and directories
in c:\windows
sDir = "c:\\*.bat" returns all batch files (.bat) in the c:\ directory
sDir = "c:\\win*.*" returns all items in the c:\ directory that
have 'win' in their name
The directory can also be a relative path. The function returns all items
that match the filter, separated by sDelim, in a single string.
Example
Code |
1 >>string
s = GetDirContents(".\\*.txt", ":");
2 >>disp(s);
script.txt:test.txt:test.txt:tutorial.txt |