473,322 Members | 1,504 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,322 software developers and data experts.

FindFirstFile/FindNextFile - fastest alternative?

If you're trying to create a fast file find function that will work in
both XP-32 and XP-64, what method would you use?

Oct 6 '06 #1
3 3214
Are you handling one file at a time or will a collection of files be
sufficient. If it's one at a time, take a look at the VB legacy "dir"
statement and function. If a collection will suffice, take a look at the
system.io.directory namespace.

Mike Ober.

"technodwebe" <go**************************@xoxy.netwrote in message
news:11**********************@i3g2000cwc.googlegro ups.com...
If you're trying to create a fast file find function that will work in
both XP-32 and XP-64, what method would you use?



Oct 7 '06 #2
"technodwebe" <go**************************@xoxy.netschrieb:
If you're trying to create a fast file find function that will work in
both XP-32 and XP-64, what method would you use?
Depending on the exact situation I'd recursively call
'System.IO.Directory.GetFiles'.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Oct 7 '06 #3
Thanks! That worked really well. It's a lot slower than the API, but
you use whatcha got :)

Herfried K. Wagner [MVP] wrote:
"technodwebe" <go**************************@xoxy.netschrieb:
If you're trying to create a fast file find function that will work in
both XP-32 and XP-64, what method would you use?

Depending on the exact situation I'd recursively call
'System.IO.Directory.GetFiles'.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
Oct 8 '06 #4

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

Similar topics

2
by: Rich Strang | last post by:
Hi group I have just got the FindFirstFile function working in my small tutorial app, the problem is that I can only seem to get it working when I hard code the search string. I have defined a...
2
by: Masao Kishore | last post by:
I need codes to access all files in all subdirectory in one directory in VC++ or VStudio but in console (DOS) mode. Thank you for your help in advance. M.K.
2
by: tom | last post by:
Hello, I want to know if FindFirstFile() can do more as I expect. FindFirstFile() can take the arguement of "*" or "?", for example, FindFirstFile("result.*.txt", &FileData); I want to...
1
by: Paulo Eduardo | last post by:
Hi, all! We are devleping one app that will use disk access with FindFirstFile and FindNextFile for it. Can someone expose me how works FindFirstFile and FindNextFile in disk access? Does the...
3
by: vighnesh | last post by:
Hello Everyone I am developing a project in VB.NET in which I need to use Win32 API function FindFirstFile()/FindNextFile()/FindClose() The same code is wroking fine in VB 6.0 , but when I used...
2
by: LewS | last post by:
My application uses FindFirstFile for searching for specific file types entered by a user. Entries like c:\myfiles\*.txt and \\myserver\shareddrive\myfiles\*.txt work okay, but when I use a UNC...
13
by: Lance | last post by:
Hi All, I'm working on a program that requires searching multiple drives for multiple file types and cataloging them based on certain geospatial attributes. All together, there are hundreds of...
9
by: Comcast Newsgroups | last post by:
Hello everyone, I am programming in Visual Studio 2002, VB.net. I typically stick to version 1.0 of the framework for compatibility reasons. Recently, I ran into an issue that I couldn't...
1
by: gudiya | last post by:
hello everybody I am having a very wierd problem.i am developing a win ce applicationin which I am marshalling win ap function findfirstfile and findnextfile in c# .My problem is it reads the file...
3
by: gudiya | last post by:
hi, My code works but i am missing the first 2 characters of file name. Any idea why???? using System; using System.Collections.Generic; using System.ComponentModel; using System.Data;...
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
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
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: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
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: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.