|
|
|
|
Functions
MioScript Reference
|
|
Syntax
| disk.folder.list(Path, ArrayName) |
Parameters
| STRING | Path | Path to the folder. The last / must not be specified.
| | ARRAY | ArrayName | Name of an array |
Return value
No value is returned.
Description
Fill an array with the list of folders found in a folder.
Important: always clear the array before you call this function, as shown in the sample code bellow.
If you want to retrieve more than one level of sub-folders: disk.folder.tree |
MioScript Sample Code
// This sample build an HTML document
// with the list of folders on your desktop.
&folder_list[] = "" // Always clear the array before calling the function
disk.folder.list(path.desktop("*.*"), folder_list)
// Build an HTML list
&HTML = ""
for(&ptr, 0, var.array.count(folder_list))
&HTML=&HTML""&folder_list[&ptr]"<BR>"
for.next
// Build the HTML document
&HTML = "<HTML><BODY>"&HTML"</BODY></HTML>"
// Save the file to disk
disk.file.save(path.desktop("list.htm"), &HTML) |
|
|
|