Can anybody help?
Say that you have a folder with hundreds of notepad "txt" files. How, using FindFirst$ & FindNext$, can I list them to a ListBox. I have tried but I am having trouble with FindNext$. It seems to "skip" files.
Does anybody have an example?
Many thanks in advance!!!
Darren
Find ALL files in a directory
-
- Posts: 11
- Joined: Thu Jul 30, 2009 10:41 am
Find ALL files in a directory
[quote author=7A607C70727E130 link=1313057733/0#0 date=1313057733]Can anybody help?
Say that you have a folder with hundreds of notepad "txt" files. How, using FindFirst$ & FindNext$, can I list them to a ListBox. I have tried but I am having trouble with FindNext$. It seems to "skip" files.
Well you can try this example....I know it has worked for me...
sub DirectoryListing()
Dim TempStr as string
RichWin.text=Findfirst$("*.txt")
do
TempStr = FindNext$
RichWin.text=RichWin.text + chr$(10)+TempStr
loop until TempStr=""
end sub
Does anybody have an example?
Many thanks in advance!!!
Darren[/quote]
Say that you have a folder with hundreds of notepad "txt" files. How, using FindFirst$ & FindNext$, can I list them to a ListBox. I have tried but I am having trouble with FindNext$. It seems to "skip" files.
Well you can try this example....I know it has worked for me...
sub DirectoryListing()
Dim TempStr as string
RichWin.text=Findfirst$("*.txt")
do
TempStr = FindNext$
RichWin.text=RichWin.text + chr$(10)+TempStr
loop until TempStr=""
end sub
Does anybody have an example?
Many thanks in advance!!!
Darren[/quote]