Ping Randy Birch?
- From: "Pop`" <nodoby@xxxxxxxxxxxxxxxxxxx>
- Date: Mon, 01 Oct 2007 03:45:45 GMT
VB6, SP6, XP Pro SP2+
This concerns, from MVPS.org:
FindFirstFile: Recursive File Search for Single or Multiple File Types
(minimal code)
Author: VBnet - Randy Birch
I can't give a URL since MVPS never changes the displayed URL, and since
I'm forbidden to display it here by the notice in the code, this is all I
can do. But that's the exact title.
My questions are pretty simple anyway (I think). I've been playing with
several of the FindFile routines and trying to figure them out. I'm only
partially succeeding so far, but my question is more general than a line of
the code.
1. The code runs blazingly fast on any drive but C:, my boot drive. That
includes my external USB drive which contains several magnitudes more data
files than C: does, both in quantity and in total bytes occupied. It's a
500Gig drive about half full, where there's abt 50 of 80 Gig used on C:.
On C: however it takes as long as 40 seconds at times (according to the
program timer) before it recurses all of the sub directories and displays
the listing of files it found. I think the time is often longer than that
in reality.
I usually use *.bat for a find pattern since I have those scattered all
over the place.
-- Is Drive C so slow by comparison because it's searching the same drive
the code runs on? I've watched my page file Usage and haven't noticed any
large growth in it; it stays right around 300 Meg; total available to it is
1532 Meg twice.
I have not compiled and run the code; all is from the IDE.
2. Like the text says, it's "minimal" code and I've been confused a few
times as to whether the program was running or not and if you click the
Begin Search button at the wrong time, it'll go out into space for long
periods of time on drive C. I've only given it about a minute to come back
before ending it, but it's obvious I'm starting something when I click the
button while it's working that I shouldn't be<g>. Maybe it's running twice
or something; I haven't tried to find out yet. Really interesting stuff,
though.
So, I tried to put a "working" label on the form so I'd know I clicked
the button correctly and hadn't moved the mouse and destroyed the click or
whatnot. This label is by itself, not under or over anything else, and sets
to OFF in the form_load like it's supposed to.
However, there doesn't seem to be ANYWHERE in the code that I can place a
..visibility = True to make the label show up BEFORE the search results!
Something in the code is causing that, obviously. I've even gone to far
as to add another command button whose only function is to display that
label, and then call the search code in the other button, and still the
"working" will not show up until the search data shows up. Kinda defeats
its purpose!
So, if you could explain to me WHY that is, I would be forever grateful! I
can NOT figure out why that label won't display, and THEN the Search routine
run, letting the label display during that time when the list box is empty.
And of course, what should I do to make it display immediately after the
Search button is pressed and stay there until the Search is completed and
List1 populated?
I did seem to find that when the search is running it has taken over the
cpu so nothing else can happen, so I sprinkled some do-events around,
without success, after reading about them so often here, not because I knew
for sure what I was doing but it seemed to make some sense.
TIA,
Pop`
.
- Follow-Ups:
- Re: Ping Randy Birch?
- From: Randy Birch
- Re: Ping Randy Birch?
- From: Dave O.
- Re: Ping Randy Birch?
- From: Larry Serflaten
- Re: Ping Randy Birch?
- From: Mike Williams
- Re: Ping Randy Birch?
- From: Mike Williams
- Re: Ping Randy Birch?
- From: Steve Gerrard
- Re: Ping Randy Birch?
- Prev by Date: RE: Faxing
- Next by Date: Re: Ping Randy Birch?
- Previous by thread: RE: Faxing
- Next by thread: Re: Ping Randy Birch?
- Index(es):