|
|
|
|
Functions
MioScript Reference
|
|
Syntax
| disk.file.list(Path, ArrayName) |
Parameters
| STRING | Path | Path to scan
| | ARRAY | ArrayName | Name of an array |
Return value
No value is returned.
Description
Fill an array with the list of files found in a folder.
Important: always clear the array before you call this function, as shown in the sample code bellow. |
MioScript Sample Code
// This sample build an HTML document
// with the list of files on your desktop.
&files_list[] = "" // Always clear the array before calling the function
disk.file.list(path.desktop("*.*"), files_list)
// Build an HTML list
&HTML = ""
for(&ptr, 0, var.array.count(files_list))
&HTML=&HTML""&files_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) |
|
|
|