GetFiles in order

  • Thread starter Thread starter Rob Oldfield
  • Start date Start date
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.
 
* "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.
 
Back
Top