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.

Are your corporate email signatures appalling?

Is it scary how unprofessional your email signatures look? Do users create their own terrible designs and give themselves stupid job titles? You can make this a lot easier for yourself by choosing an email signature management solution from Exclaimer today.


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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
A Bare Metal Image backup allows for the restore of an entire system to a similar or dissimilar hardware. They are highly useful for migrations and disaster recovery. Bare Metal Image backups support Full and Incremental backups. Differential backup…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
In this video, we discuss why the need for additional vertical screen space has become more important in recent years, namely, due to the transition in the marketplace of 4x3 computer screens to 16x9 and 16x10 screens (so-called widescreen format). …

919 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

14 Experts available now in Live!

Get 1:1 Help Now