Categories: MSDN / DotNet / Java / Scripts / Linux / PHP Ask - La ask - La Answer

List files in a directory with a certain extension

I want to list files (into a listbox) in the app folder with a certain extension such as .pdf.
I'm not quite sure where to begin, any help or please point me in the right direction. Thanks
[202 byte] By [jobartley515] at [2007-11-11 8:18:05]
# 1 Re: List files in a directory with a certain extension
Use the Dir function:

dim s as string
s = Dir("c:\myfolder\*.tdf")
do
if len(s) = 0 then exit do
list.additem s
s = dir
loop
mstraf at 2007-11-11 17:25:43 >
# 2 Re: List files in a directory with a certain extension
So simple.

Thanks
jobartley515 at 2007-11-11 17:26:43 >