Hi Guys, i need a little help with some code to get the file size from a list of files
i have a txt file wich contains the path to to the files on each on a new line, im useing this code
now, the code works but it rolls through the file sizes and ends up only displaying the size of the last file in the list, how would i go about adding all the file sizes togeather and display the final result in the label object
iv been on this for about 3 hours and this is as far as iv got
i have a txt file wich contains the path to to the files on each on a new line, im useing this code
PHP Code:
sel = ListBox.GetSelected("lbSavedPlaylist");
if sel then
sPlayListFilePath = ListBox.GetItemData("lbSavedPlaylist", tSelected[1]);
tSelectedPlayList = TextFile.ReadToTable(sPlayListFilePath);
nTable = Table.Count(tSelectedPlayList);
for i=1,nTable do
sPath = tSelectedPlayList[i];
if sPath == "" then
Table.Remove(tSelectedPlayList, i)
else
tFileParts = String.SplitPath(sPath);
files = File.Find(tFileParts.Drive..tFileParts.Folder, "*.mp3", true, false, nil, nil);
fSize = File.GetSize(sPath);
Label.SetText("laFsize", fSize);
end
end
end
iv been on this for about 3 hours and this is as far as iv got
Comment