473,320 Members | 1,846 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

DirectoryInfo.GetFiles

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
Nov 20 '05 #1
5 6468
Cor
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
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.

Nov 20 '05 #2
Ahhh and over a network.....

that could be it...
"Cor" <no*@non.com> wrote in message
news:u3**************@TK2MSFTNGP12.phx.gbl...
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
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.


Nov 20 '05 #3
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
"Cor" <no*@non.com> wrote in message
news:u3**************@TK2MSFTNGP12.phx.gbl...
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
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.


Nov 20 '05 #4
Cor
> Ahhh and over a network.....

that could be it...

Hi CJ,

That you did not say :-))

Cor
Nov 20 '05 #5
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
"Cor" <no*@non.com> wrote in message
news:eh**************@tk2msftngp13.phx.gbl...
Ahhh and over a network.....

that could be it...

Hi CJ,

That you did not say :-))

Cor

Nov 20 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Demetri | last post by:
Using the GetFiles method of the DirectoryInfo instance one can pass in a search pattern of string type. For example: DirectoryInfo di = new DirectoryInfo("C:\temp"); FileInfo fi =...
4
by: Pluto | last post by:
Hi, I want to get a list of files matching certain extensions, such as "*.jpg;*.gif" (i.e. all files ending with .jpg and .gif). I was using DirectoryInfo.GetFiles(string) method....
0
by: Glenn Venzke | last post by:
I have an aspx page that is set up to copy backed-up DB files from a shared directory to a local folder. For some reason, it is being denied access to the network share. I have the web app running...
8
by: Lyners | last post by:
I have code that retrieves all of the file names within a directory. After retriving them, I display the information in a datagrid. What I would like to do is add an extra output column on the...
3
by: xenophon | last post by:
This following innocuous code: System.IO.DirectoryInfo fff = new System.IO.DirectoryInfo(); System.IO.FileInfo ppp = fff.GetFiles( Request.MapPath(".") ); for( int ccc=0 ; ccc < ppp.Length ;...
13
by: Tom Scales | last post by:
OK, I admit, I am not a VB.NET expert and am still learning, but have run into an annoying problem. I'm writing a program that has to search the file system and therefore processes large numbers...
1
by: jobs | last post by:
Say I only have a single file I want to get information on. How can I adapt this code? Dim dr As DataRow Dim fi As FileInfo Dim dir As New DirectoryInfo(filename) Dim dt As New DataTable...
2
by: RodneyAnonymous | last post by:
Hello everyone. I'm working on a simple utility that lists all files in a given directory with a given extension and outputs the results to a text file. I'm encountering issues while testing where...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.