GetFiles in order

R

Rob Oldfield

If I'm using something like....

Imports System.IO

Dim di As New DirectoryInfo(Path)
Dim fiArr As FileInfo() = di.GetFiles("*.doc")
Dim fi As FileInfo
For Each fi In fiArr
'do whatever
Next fi

....then is there a way to specify the order of the files read. I know that
I could do something like read the files into an array and then sort that,
but is there a default way of explicitly saying something like
di.GetFiles("*.doc",InDateOrder)

Thanks.
 
H

Herfried K. Wagner [MVP]

* "Rob Oldfield said:
Dim di As New DirectoryInfo(Path)
Dim fiArr As FileInfo() = di.GetFiles("*.doc")
Dim fi As FileInfo
For Each fi In fiArr
'do whatever
Next fi

...then is there a way to specify the order of the files read.

No.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top