I am not familiary with list. In below code, I use dynamic array that I need to redim as needed. If I want to use list, Please advise how to delare the varibles?
#MaxSongInDir=1
#MaxDir=1
Structure Songs ; store all songs name in an sub directory (Path$)
Path$
SongQty.i
Array SongName$(#MaxSongInDir)
EndStructure
Structure DirInfos ; store the song info in an parent directory
TotalSong.i
TotalDir.i
Array DirNo.Songs(#MaxDir)
EndStructure
Global Dim RootDir.DirInfos(2)
ReDim RootDir(1)\DirNo(2)
ReDim RootDir(2)\DirNo(1)\SongName$(3)
Structure Songs ; store all songs name in an sub directory (Path$)
Path$
SongQty.i
List SongName$()
EndStructure
Structure DirInfos ; store the song info in an parent directory
TotalSong.i
TotalDir.i
List DirNo.Songs()
EndStructure
Global NewList RootDir.DirInfos()
AddElement(RootDir())
RootDir()\TotalSong=2
RootDir()\TotalDir=1
AddElement(RootDir()\DirNo())
RootDir()\DirNo()\Path$="C:\"
RootDir()\DirNo()\SongQty=5
AddElement(RootDir()\DirNo()\SongName$())
RootDir()\DirNo()\SongName$()="S1"
AddElement(RootDir()\DirNo()\SongName$())
RootDir()\DirNo()\SongName$()="S2"