This is an example of how to populate mp3's to a tree object from a folder and output each file to a textfile for later use. [maybe a playlist]
This is a modified version of TristanD's example which is located here
On Global Functions:
Button On Click Event:
This is a modified version of TristanD's example which is located here
On Global Functions:
Code:
function GetFolderContentsFromDialog() folderbrowse = Dialog.FolderBrowse("Please select a folder:", _SourceDrive); if (folderbrowse ~= "CANCEL") then MP3 = File.Find(folderbrowse, "*.mp3", true, false, ShowSearchProgress, nil); if MP3 then for index, path in MP3 do MP3path = path TextFile.WriteFromString("AutoPlay\\Docs\\playlists\\default.txt", MP3path.."\r\n", true); end for i,v in MP3 do tbSplit = String.SplitPath(v); name = tbSplit.Filename tblNodeData = {}; tblNodeData.Text = name; tblNodeData.Data = v; Tree.InsertNode("Tree1", "3", tblNodeData); end end end end
Code:
GetFolderContentsFromDialog()
Comment