• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 427
  • Last Modified:

How do I find out how many files are in a huge folder without opening it?

I have a huge number of files in an exchange folder that are all junk. I want to know how many files there are so I can see how long it will take to delete them all. Problem is I know if i try to open that folder or check the properties, it will stop responding. Is there a way in Server 2003 to see how many files are in a folder without having to open it or see all the files? Possibly with powershell or cmd?
0
ryanrh
Asked:
ryanrh
  • 3
  • 2
2 Solutions
 
sonic4269Commented:
from cmd type:  dir Your_Directory | find /i "file"
0
 
sonic4269Commented:
or dir/b/a-d Your_Directory | find /v /c "::"

or just plain dir from cmd prompt.  It will list all contents but at the bottom show the number of files and directories,  and being that it is a command prompt it should not take as long.  
0
 
ryanrhAuthor Commented:
Well it looks like both of those will take a very long time, but at least I will know they are working. There are at least 200,000 files in this folder, so we will see. Thanks
0
 
sonic4269Commented:
Try the program "xfile"  it will show you the directory stats of any "logged" directory.  You can log the entire drive,  which i would imagine would take a very long time and then view the stats of each folder later.  At least you could set it to run at night.  Let me know if that makes sense?

http://www.coastline-software.com/
0
 
ryanrhAuthor Commented:
Yes that makes sense. I will definitely check that out and give it a try.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now