Using Folder Properties to Count the Number of Files or Folders

Written by Eric Wyatt (last updated January 11, 2021)

3

We have discussed two ways to count the number of files and subfolders within a folder or directory. The first methodutilized PowerShell, Microsoft's newest and more powerful command-line editor. The second method discussed using the Command Line . This is the older, but more-often known command line editor. Both of these methods work fast and, depending on the command, provide the information you are looking for.

Some individuals may find using a command line function to be intimidating, and not something they want to mess with. If you fall into that group, you are not alone. Even so, you can still obtain a count of the number of items within a folder.

This method is done without ever needing to launch a program or application, so no additional software is needed. To obtain the counts, follow these steps:

  1. Open an Explorer window that contains the folder or directory for which you want counts.
  2. Right-click on the folder or directory. Windows display a Context menu.
  3. Select "Properties" at the bottom of the Context menu. This opens the Properties window for that specific folder. Alternatively, you can select the folder or directory and press Alt+Enter to open the Properties window.
  4. Under the General tab, you will see the "Contains" section. Here you will find the number of files and folders. (See Figure 1.)
  5. Figure 1. A folder's Properties window showing the number of files and folders.

  6. Close the Properties window when done.

While this method is fast and easy, there are a few things to bear in mind when using this technique. First, the counts provided in this manner have been known to not always be accurate. Depending on your version of Windows, this feature can be buggy and incorrect. If you are needing to know the number of files or folders within a folder or directory for moving, backup, or a critical reason, it is recommended to try using the PowerShell or Command Line methods mentioned earlier and compare the results. The second item to keep in mind is that, by default, the Properties window does not include hidden items in its counts; you can include these by checking the box next to "Hidden" within the properties window.

 This tip (9965) applies to Windows 10.

Author Bio

Eric Wyatt

Eric Wyatt is a swell guy (or so his friends tell him). He is a formally trained designer and branding expert, bringing a wide range of skills to his Tips.Net articles. ...

MORE FROM ERIC

Currency Conversions

The need for currency conversions is an increasing need in a more connected world. The calculator found within Windows 10 ...

Discover More

Opening Apps with a Keystroke

Opening Windows apps is typically easy with your mouse, but for the apps you use more often there is a way to do this ...

Discover More

Customize Edge's Kids Mode

Microsoft Edge Chromium's Kids Mode allows for restricted viewing for child safety. See how to customize Kids Mode to ...

Discover More
More WindowsTips

Adjusting Speaker Volume

Adjusting your computer's speaker volume is a quick process. Windows gives you simple access to the overall volume level ...

Discover More

More Powerful Notes

Sticky Notes in Windows 10 is a helpful app. When you go beyond just a note, it's even more helpful.

Discover More

Share with a Nearby Computer

Have you ever needed to quickly share something with another computer? With Nearby Sharing, part of the Windows 10 April ...

Discover More
Comments

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] (all 7 characters, in the sequence shown) in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is 8 - 5?

2023-05-25 10:42:45

J. Woolley

I'm using Windows 10. If I open Explorer, pick a folder, and type * in the Search box (top-right), the result is a list of all files and folders in the parent folder plus all files and folders in each subfolder plus ... (recursively). The list can be sorted in various ways. At the bottom-left is a count of all items in the list plus the number of items selected.
If you have access to Excel, the following dynamic array function is included in My Excel Toolbox (which is free to use):
=ListFiles([RootFolder],[SkipSubfolders],[SkipHidden],[SkipHeader])
If optional RootFolder is "" (default), the path to the formula cell's workbook will apply. Otherwise, RootFolder must be an absolute folder path like "C:\Users\MyName\Documents" or "\\SERVER\SharedFiles" or a folder path that is relative to CurDir like "Office\Excel" or "Personal\Financial" where CurDir is usually C:\Users\MyName\Documents. Optional Skip... arguments are False by default.
The ListFiles function returns an array with three columns (Folder, File, Last Modified) sorted by Folder, then by File. Each new folder will have blanks in the File and Last Modified columns. The result can be analyzed in various ways.
My Excel Toolbox's SpillArray function simulates a dynamic array in older versions of Excel:
=SpillArray(ListFiles([RootFolder],[SkipSubfolders],...))
That function is described in UseSpillArray.pdf.
See https://sites.google.com/view/MyExcelToolbox


2023-05-24 11:07:43

Will

This works fine for any single folder but...
I have a folder containing many subfolders. It would be nice if it were possible to view the number of files in each of those subfolders without clicking on each of them. One of the optional columns (like Name, Date, Type, etc) in the Detail view is File Count. It's non-functional. People who've tried it in the past got no help from MS tech support.
https://answers.microsoft.com/en-us/windows/forum/all/i-have-added-the-file-count-column-to-my-folder-in/d7ac6505-265f-4e55-b89f-1310f1eaec7c


2021-01-11 09:31:48

Liz

I have a folder "JOBS" within which are folders: Job 1, Job 7b, Job 141, etc. Within JOb s are multiple folders. All I want is the count of the actual jobs (Job a plus Job b =2 folders, for example). (the jobs are not alphabetical and the numbers are as above). I do not want the count to include folders within the Job. Using your method included ALL folders. How do I just get a count of the top tier of folders? Simple please - and can be pretty accurate without being exact (don't care if it is 100 or 102)


Newest Tips