Difference between revisions of "FolderItem.Children"

From Xojo Documentation

m (Gperlman moved page Folderitem.Children to FolderItem.Children without leaving a redirect)
Line 16: Line 16:
 
<rbcode>
 
<rbcode>
 
Var DesktopFiles as folderitem = SpecialFolder.Desktop
 
Var DesktopFiles as folderitem = SpecialFolder.Desktop
for each file as folderitem in DesktopFiles
+
for each file as folderitem in DesktopFiles.Children
 
   Listbox1.AddRow(file.name)
 
   Listbox1.AddRow(file.name)
 
Next
 
Next
 
</rbcode>
 
</rbcode>

Revision as of 15:55, 23 June 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.Children
Listbox1.AddRow(file.name)
Next