From: C. Kevin Provance on
"Karl E. Peterson" <karl(a)exmvps.org> wrote in message
news:uNaPu0bsKHA.4752(a)TK2MSFTNGP04.phx.gbl...
| Or maybe they just need an IT dept, or even a dept guru, with a clue.
| 320 folders, *each* with a single TXT file??? That's pretty funny.

320 subfolders. That's just plain sad.

Why?


From: Nobody on
"C. Kevin Provance" <*@*.*> wrote in message
news:%23Ji3X6csKHA.4704(a)TK2MSFTNGP04.phx.gbl...
> "Karl E. Peterson" <karl(a)exmvps.org> wrote in message
> news:uNaPu0bsKHA.4752(a)TK2MSFTNGP04.phx.gbl...
> | Or maybe they just need an IT dept, or even a dept guru, with a clue.
> | 320 folders, *each* with a single TXT file??? That's pretty funny.
>
> 320 subfolders. That's just plain sad.
>
> Why?

My guess is that they receive these files from different clients, and using
subfolders prevents file name conflicts. Obviously there are many better
ways than this.


From: DanS on
"Helmut Meukel" <NoSpam(a)NoProvider.de> wrote in
news:uTIBSsbsKHA.6004(a)TK2MSFTNGP04.phx.gbl:

>
> "MikeD" <nobody(a)nowhere.edu> schrieb im Newsbeitrag
> news:OkwT9UbsKHA.3536(a)TK2MSFTNGP06.phx.gbl...
>>
>>
>> "catharinus" <csvanderwerf(a)planet.nl> wrote in message
>> news:5aa9d224-bae2-4bef-99ee-bc7761cc0d2f(a)g26g2000yqn.googlegroups.com
>> ...
>>> Hello
>>>
>>> I am trying to quickly show the txt-files which are located in for
>>> example 320 subfolders of a folder and read the content of those
>>> files in a listview of a form. I can't find a QUICK way to do this.
>>> Should I use Sendmessage to do this? And if Yes ,how should I do
>>> this?
>>
>>
>> So you're searching for txt files in 320 folders? And then reading
>> those files and loading their contents into a listview? And what
>> would your idea be (time-wise) of doing this quickly? There are many
>> factors involved. Do any of those 320 subfolders have their own
>> subfolders that you're also searching? Approximately how many txt
>> files? Are you loading the entire contents of ALL txt files into the
>> ListView (and why a ListView)? That could take anywhere from a couple
>> of minutes to perhaps several hours. It all depends, not only on just
>> the couple things I mentioned but also the computer and its hardware.
>>
>> Probably your best option to find the files is to use the
>> FindFirstFile, FindNextFile, and FindClose API functions. Search the
>> newsgroup for FindFirstFile and you'll find plenty of example code to
>> use these functions in a recursive procedure (recursion is what makes
>> it possible to specify one folder and search all its subfolders).
>>
>> For reading each file's contents, I'd think VB's own file I/O should
>> be fine.
>>
>> You're also probably going to find that this will slow down
>> exponentially as you add more and more ListItems into the ListView.
>> Which is why I question using a ListView for this.
>>
>> --
>> Mike
>>
>
> To add to this: even one folder with many text files - even small ones
> - will slow down the OS in accessing its directory. One of my
> customers knits medical stockings - made to measure - and got the
> orders as plain text files transfered via RAS into a shared directory.
> Our programs processed the data and moved the files to an archive
> directory. Small files of 400 to 800 bytes, but 300 to more than 400
> per day. We found that storing more than 20,000 files (3 months) in
> one directory was a bad idea, the system slowed down to a crawl when
> accessing these directories.

Was this a system with a realtime AV scanner running on it ?

I had this downloaded demo program that was a single self-extrafting exe
file of 450 megs. Every time I went to access the folder, Explorer
appeared to hang and wouldn't do anything and several times I killed it
and restarted Explorer......

.......As it turns out, I was just being impatient and not waiting long
enough for the AV scanner to finish it's job. (Although, we *shouldn't*
all *need* to use AV scanners anyway.......maybe that's one of the
reason's my Linux box seems a bit snappier.)
From: Nobody on
"DanS" <t.h.i.s.n.t.h.a.t(a)r.o.a.d.r.u.n.n.e.r.c.o.m> wrote in message
news:Xns9D2560CA2AC20thisnthatroadrunnern(a)216.196.97.131...
> I had this downloaded demo program that was a single self-extrafting exe
> file of 450 megs. Every time I went to access the folder, Explorer
> appeared to hang and wouldn't do anything and several times I killed it
> and restarted Explorer......
>
> ......As it turns out, I was just being impatient and not waiting long
> enough for the AV scanner to finish it's job. (Although, we *shouldn't*
> all *need* to use AV scanners anyway.......maybe that's one of the
> reason's my Linux box seems a bit snappier.)

Off topic: It's not your AV software but Explorer in XP+SP2+ scans the file
looking for digital signatures. This was reported many times on Inno Setup
groups with people who make large installers. Examples:

Large signed installers and Vista
http://news.jrsoftware.org/news/innosetup/msg83093.html

UAC on Vista takes a very long time to respond on large files
http://news.jrsoftware.org/news/innosetup/msg77894.html