Too Many Files

Johnny

Distinguished
Mar 15, 2001
216
0
18,680
Archived from groups: microsoft.public.win2000.file_system (More info?)

Why is it when you open a folder with 53,000 files in it Explorer freaks
out and hangs. If I drop to a command promt and try to delete the files
from there is takes over an hour. Am I doing something wrong?
 

Johnny

Distinguished
Mar 15, 2001
216
0
18,680
Archived from groups: microsoft.public.win2000.file_system (More info?)

In article <MPG.1af05241a14642c4989680@msnews.microsoft.com>,
alphascooter-verizon@yahoo.com says...
> Why is it when you open a folder with 53,000 files in it Explorer freaks
> out and hangs. If I drop to a command promt and try to delete the files
> from there is takes over an hour. Am I doing something wrong?
>
I might add that it is my Exchange Badmail folder that is producing so
many messages.
 

Tom

Distinguished
Dec 31, 2007
1,720
0
19,780
Archived from groups: microsoft.public.win2000.file_system (More info?)

I'm not sure about Exchange, but I had a similar situation once where I had 20K files or something somewhat similar in one directory. The system did apparently hang, but when I let it run and run (I think overnight) it did come back and I was able to delete the necessary files. I'd suggest A) Clear the recycle bin B) run defrag against the drive C) reboot and retry D) try removing a few items at one time and also clearing out the recycle bin.
My experience was on a 500Mhz Win2K server that had 192MB of memory at that time (512MB at most, I can't remember when we upgraded the memory).
Good luck,
 
G

Guest

Guest
Archived from groups: microsoft.public.win2000.file_system (More info?)

Best to post Exchange questions in an Exchange group - such as
m.p.exchange.admin

In a command prompt:

del <full path to badmail>\*.* /q

And yes, with that many files it's gonna take a while. Let it run til it's
done. If you're using the default badmail path, enclose the path in quotes
as there's a space in it.

Set up a batch file containing that command and schedule it to run
daily/nightly in task scheduler. That way this won't happen again. You
can't stop badmail from getting files in it, but you can keep it manageable.
I also recommend changing the path in ESM to something like d:\badmail to
make it easier to find.

Johnny wrote:
> In article <MPG.1af05241a14642c4989680@msnews.microsoft.com>,
> alphascooter-verizon@yahoo.com says...
>> Why is it when you open a folder with 53,000 files in it Explorer
>> freaks out and hangs. If I drop to a command promt and try to
>> delete the files from there is takes over an hour. Am I doing
>> something wrong?
>>
> I might add that it is my Exchange Badmail folder that is producing so
> many messages.
 
G

Guest

Guest
Archived from groups: microsoft.public.win2000.file_system (More info?)

The reason for the apparent hang is that Explorer iterates the entire
directory when you open it. If you watch taskman, you will see Explorer.exe
go to 100% CPU for the duration of the activity.

A cmd prompt, on the other hand, does not do that. It just opens the
directory. If you do a dir from there, you will get more or less the same
behavior (except it will be cmd.exe that causes the 100% CPU), but you can
hit ctrl-c to break in.


Pat

"Tom" <anonymous@discussions.microsoft.com> wrote in message
news:F67856AA-C12E-49C2-B806-31B79ED9890D@microsoft.com...
> I'm not sure about Exchange, but I had a similar situation once where I
> had 20K files or something somewhat similar in one directory. The system
> did apparently hang, but when I let it run and run (I think overnight) it
> did come back and I was able to delete the necessary files. I'd suggest
> A) Clear the recycle bin B) run defrag against the drive C) reboot and
> retry D) try removing a few items at one time and also clearing out the
> recycle bin.
> My experience was on a 500Mhz Win2K server that had 192MB of memory at
> that time (512MB at most, I can't remember when we upgraded the memory).
> Good luck,