Listing contents of audio files folder

Hi All. Im using the code from the pi audio player example and it works fab. I cant work out how to reference a folder within xojo though if that makes sense. In this version you need to choose an external folder . Ive tried just making a folder and referencing it so it parses the contents but didnt work.

Heres the code that works with choosing external folder ( ie on desktop) . PlayNextSong is a method that then plays the tracks one after another.

I have tried replacing the SelectFolder reference with a folder within the app

[code]’ Choose a folder, grab all music files in the folder
’ and save in array
Dim musicFolder As FolderItem = SelectFolder
If musicFolder <> Nil Then
CurrentSongIndex = -1
ReDim Songs(-1)

Dim count As Integer = musicFolder.Count
For i As Integer = 1 To count
Dim f As FolderItem = musicFolder.Item(i)
If f <> Nil And (f.Name.Right(3) = “mp3” Or f.Name.Right(3) = “m4a” Or f.Name.Right(3) = “wav”) Then
Songs.Append(f)
End If
Next
End If

PlayNextSong[/code]