New topic: Listing specific file into listbox
<http://forums.realsoftware.com/viewtopic.php?t=46576> Page 1 of 1 [ 1 post ] Previous topic | Next topic Author Message Rivo Post subject: Listing specific file into listboxPosted: Wed Jan 16, 2013 1:46 am Joined: Tue Aug 29, 2006 4:04 am Posts: 484 Location: Indonesia Hi, I'm using this code to list an item of a folder into a listbox, this is working properly, but way to slow to load the file. If the files in the folder less than 10 files, it can run faster, if its more, its really takes some time. is there any other ways to do this operation than using this code.? Dim f As FolderItem Dim filetype() As String Dim fileext,path As String Dim i As Integer //load path dim t as textinputstream dim p as string dim ok as boolean ok=false f=getfolderitem("db.path") '\\server\main\ t=textinputstream.open(f) p=t.readline t.close f = getfolderitem(p).child("data") filetype = Array(".odr",".cons") For Each fileext In filetype For i = 1 To f.Count If (f.Item(i).Name.Right(fileext.Len).Lowercase = fileext) Then ListBox2.AddRow( f.Item(i).Name) End If Next Next Thanks Regards Rivo Top Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending Page 1 of 1 [ 1 post ] -- Over 1500 classes with 29000 functions in one REALbasic plug-in collection. The Monkeybread Software Realbasic Plugin v9.3. http://www.monkeybreadsoftware.de/realbasic/plugins.shtml [email protected]
