Difference between revisions of "FolderItem.Children"

From Xojo Documentation

Line 10: Line 10:
 
}}
 
}}
 
{{Description
 
{{Description
|text = }}
+
|text = Allow you to iterate through all the files in a folder.}}
 +
 
 +
==Examples==
 +
This example adds the names of all the files on the desktop to a listbox:
 +
 
 +
Var DesktopFiles as folderitem = SpecialFolder.Desktop
 +
for each file as folderitem in DesktopFiles
 +
  Listbox1.AddRow(file.name)
 +
Next

Revision as of 20:05, 24 May 2019

Method

FolderItem.Children(resolveAlias as Boolean) As Iterable

New in 2019r2

Supported for all project types and targets.

Allow you to iterate through all the files in a folder.

Examples

This example adds the names of all the files on the desktop to a listbox:

Var DesktopFiles as folderitem = SpecialFolder.Desktop for each file as folderitem in DesktopFiles

 Listbox1.AddRow(file.name)

Next