Re: Ping Randy Birch?

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Dave O. wrote:
On your C drive is the Windows\System32 folder which can contain many
thousand files, if the routine only allows for UI refresh on folder
change then it can look like it's hit a wall of treacle when it finds
Windows\System32

As a test how long does the Widows search function take on C: and
other drives because I'd be amazed if that does not use a similar
routine (but not in VB6) to search the drives. So if there is a
similar duration difference there it would suggest the problem is not
with the code but your file distribution which is not that easy to
avoid. If you KNOW there will be no files of interest in or below the
Windows folder you can just exclude it when testing for . and ..

Agreed. None of this exercise is to pro or con Randy's code in any way, so
please don't misconstrue my curiousity. It's strictly an opportunity for me
to learn some things, albeit a lot more than I imagined it would be in the
beginning. Randy's code, in conjunction with the mentoring from you guys
here, has opened my eyes to some things I thought I understood and obviously
don't where the OS is concerned, let alone VB.
I love a challenge, especially when it'll benefit me and maybe someone
else collaterally.

Cheers,

Pop`



Regards
Dave O.

"Pop`" <nodoby@xxxxxxxxxxxxxxxxxxx> wrote in message
news:J3_Li.1112$6Y5.643@xxxxxxxxxxx
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`



.



Relevant Pages

  • Re: Ping Randy Birch?
    ... drives because I'd be amazed if that does not use a similar routine (but not ... in VB6) to search the drives. ... since I'm forbidden to display it here by the notice in the code, ... I tried to put a "working" label on the form so I'd know I clicked ...
    (microsoft.public.vb.general.discussion)
  • Re: Getting volume information
    ... did you check in your explorer and make sure ... I want to display the same information as ... but the label is always blank. ... foreach (DriveInfo di in drives) ...
    (microsoft.public.dotnet.languages.csharp)
  • Getting volume information
    ... My objective is to get the "label" information for the different ... I want to display the same information as ... Windows Explorer. ... foreach (DriveInfo di in drives) ...
    (microsoft.public.dotnet.languages.csharp)
  • Getting volume information
    ... My objective is to get the "label" information for the different ... I want to display the same information as ... Windows Explorer. ... foreach (DriveInfo di in drives) ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: 6.1 install and multiple drives
    ... Even better, I was then able to, with the new kernel installed, fdisk and label my other 7 drives - no problems! ... Would you know if there is someone I could contact to get the 6.1 updates for these files, if it is not in the repository? ... What seems to be happening is that "label" somehow seems to be duplicating the /var partition in disk0 into the disk1 partition. ...
    (freebsd-questions)