From Xojo Documentation
If this FolderItem is a directory, Index is an element in a one-based array of FolderItems in this directory.
TrueItem returns the actual FolderItem, even if it is an Alias or Shortcut. To get the FolderItem pointed to by the alias/shortcut, use FolderItem.Item.
You can also use code like this to look up the destination file:
Be aware that the returned FolderItem object may be nil, e.g. if current file permissions deny access to it.
|NOTE: If you want to iterate over the contents of a directory, make sure to always do this starting at index 1, then increasing the index up to the value of FolderItem.Count. Avoid iterating backwards (using a For...Next loop with DownTo or Step -1), because that can potentially become extremely slow with larger directories, especially on macOS. To see how to delete the contents of a folder, see the example in FolderItem.Delete.|
Avoid calling this function several times as it is costly in processing time. If you need to get several properties of an item, get it once and store it in a variable of type FolderItem, then access that variable instead.
This example populates a ListBox with the TrueItem elements of the user's Desktop directory.