Shell "Dir " + Path$ + "*.txt<C:\MyTmpDir.tmp"
ArraySize = 0
Open "C:\MyTmpDir.tmp" for Output As #1
Do
Line Input #1, A$
ArraySize = ArraySize + 1
Loop Until EOF(1)
Close
Redim MyArray$(ArraySize)
Open "C:\MyTmpDir.tmp" for Output As #1
For N = 1 to ArraySize
Line Input #1, MyArray$(N)
Next
Close