Windows 98:  How many files on a drive?

Posted on 2002-05-22
Last Modified: 2013-12-29
How can one quickly determine how many files are on a drive?  I know that one can do this during a virus scan or Disk Scan, but is there a way of determining it more quickly?  

Also, is there a way of getting statistics of file organization, such as how many files are in each folder?

One PC seems to have an inordinate number of files, but I have not yet determined where they are.  I suspect that a virus might be writing bogus files somewhere, eating up resources.  Anti-virus software does not detect any virus, but it shows a huge number of files--50,000--a lot more than other PC's in the office that gets a lot more usage.

Question by:borleymsgs

Expert Comment

ID: 7028273
one way is via a DOS Prompt:

For example, I just checked my whole C: Drive..

at the C: prompt, type DIR /S it will scroll through all of your files, and report at the end.

My C: Drive has 15,858 files, it took about 30 seconds to run.


Expert Comment

ID: 7028281
If you have the patience, with the same DIR /S command, but a /P after it, eg., Dir /S/P, this will pause at each full screen of data, the file structure will be broken down by DIR, listing how many, and how large each folder, and directory type is..


Expert Comment

ID: 7028368
Well there are any number of programs from expensive packages to freeware that address the type of things your looking at, and the features vary widely.

Here are a couple links you might use to pick one out.

Also here is one that I have played with a bit, no explicit recommendation, only that it may have some or all of what your looking for

DiskState ver 2.70
can also do some tracking of file changes addressing the "growing" problem your suspecting.

Hope that helps


Accepted Solution

nouse33 earned 100 total points
ID: 7028741
Theres an "easier" way than using DOS...

Open up the drive in 'my computer' or 'explorer' and select everything  (pressing crtl+a should do that). Then just right-click and choose' properties. That will count up all the files and folders.

you can of course do that to have windows count the files in any combination of folders.

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.


Expert Comment

ID: 7028779

that actually is a pretty handy trick and one that probably would be too easy to overlook, thanks for the reminder.

Expert Comment

ID: 7028919
>Theres an "easier" way than using DOS...

...and apparently much more accurate.... instead of the 15,858 files referenced above, using the above, i have 71.445 files, ack!@!@!@@

thanks for showing me that, it just never occured to me that would work to do that..

LVL 31

Expert Comment

ID: 7029355
Do you know what causes the discrepancy? Files inside .cab:s being counted in one mode but not the other? It would be interesting to know.

LVL 23

Expert Comment

ID: 7029420
I got 37,308 and 1,170 folders.
dir /s yields 17,404 and 3,270 dirs

My guess on the directories part is the . and .. directories that are counted by DOS but not by Windows.  I have no idea where the 20k files went.
That was going to be my suggestion, by the way.

Author Comment

ID: 7029981
As always, I received a lot of good help.  Using the properties of the selected files and folders is just what I am looking for at the moment.  I, too, should have thought of that.

Also, I am curious about the discrepencies between the DOS and Windows versions of the number of files and folders.  If anyone figures it out, let us know.  

If I need further analysis, DiskState ver 2.70 looks good.  I might download it for other purposes, such as locating duplicate files.  I am sure I have multitudes of them.

Thanks for the input.

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Recently Microsoft released a brand new function called CONCAT. It's supposed to replace its predecessor CONCATENATE. But how does it work? And what's new? In this article, we take a closer look at all of this - we even included an exercise file for…
Possible fixes for Windows 7 and Windows Server 2008 updating problem. Solutions mentioned are from Microsoft themselves. I started a case with them from our Microsoft Silver Partner option to open a case and get direct support from Microsoft. If s…
This video Micro Tutorial explains how to clone a hard drive using a commercial software product for Windows systems called Casper from Future Systems Solutions (FSS). Cloning makes an exact, complete copy of one hard disk drive (HDD) onto another d…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now