Mioplanet Documentation Center
Resources and Help
HomeProductsMioScriptJavaScriptTechNotesPHP
   Home | MioScript | disk.file.list SEARCH    

  Functions
disk.dialogBox.folder
disk.dialogBox.open
disk.dialogBox.save
disk.dialogBox.save.getFilter
disk.drive.freeSpace
disk.drive.label
disk.drive.list
disk.drive.sysName
disk.drive.totalSpace
disk.drive.type
disk.file.compress
disk.file.copy
disk.file.date.get
disk.file.date.set
disk.file.delete
disk.file.exists
disk.file.expand
disk.file.list
disk.file.load
disk.file.load.array
disk.file.load.array.append
disk.file.load.decode
disk.file.merge
disk.file.move
disk.file.save
disk.file.save.array
disk.file.save.array.encode
disk.file.save.encode
disk.file.size
disk.folder.create
disk.folder.delete
disk.folder.exists
disk.folder.list
disk.folder.remove
disk.folder.setAsSystem
disk.folder.tree

  MioScript Reference
> Statements
app...
browser...
dialog...
disk...
draw...
extern...
filename...
keyboard...
menu...
mio...
mouse...
num...
path...
pushButton...
reg...
RS232...
sci...
screen...
shortcut...
sound...
str...
system...
time...
var...
window...

Function
disk.file.list

Language: MioScript
Product: MioFactory


Syntax

disk.file.list(Path, ArrayName)


Parameters

STRINGPathPath to scan
ARRAYArrayNameName 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)