DirectoryInfo.GetFiles

  • Thread starter Thread starter CJ Taylor
  • Start date Start date
C

CJ Taylor

Hey Everyone,

Sorry haven't been around to answer questions as much as usual (or at all
for that matter) just been engrossed in a project. Anyways, dealing with an
issue using DirectoryInfo.GetFiles wondering if anyone had the same issues

I built my function to get the files, using a searchPattern filter (*.tif)
in which case I have about a gig of files in this directory (about 5000
files) and using getFiles is slower than anything I have ever seen. There
isn't a standard Async invoke on it so I was wondering if anyone else got
around this problem using the .NET Framework.

Basically it takes about 2 minutes to read dir info.

Thanks,
CJ
 
Hi CJ,

Nice to see you, I saw a Taylor in the Ado.Net group and thought it was you.

I did test it, but with a directory with more than 5000 files this was not
slow for me.
\\\
Dim di As DirectoryInfo = New DirectoryInfo("c:\Taylor")
Dim fils As FileInfo() = di.GetFiles("*.*")
Dim i As Integer
Dim fiNext As FileInfo
For Each fiNext In fils
i += 1
Next
Me.TextBox1.Text = i.ToString
///
Cor
 
Hey Cor,

Good to hear from you, what kind of file where you using? What was your
average file size. I'm wondering what is going on or if its an issue with
reading these tif files (which some are large)

-CJ
 
Yeah... I'm always forgetting little "mundane" details like that...

and decimal points...

(I will answer any question in the world if somoene actually gets that
reference.)

-CJ
 
Back
Top