Count Files and Subfolders in Windows File Explorer

Updated on November 19, 2026

Counting files and subfolders in Windows File Explorer

To count everything inside a Windows folder, right-click the folder in File Explorer, select Properties, and look for Contains on the General tab. Windows counts files and folders inside it, including items in nested subfolders. Give large folders a moment to finish counting.

What You Want to Count Method to Use
All files and subfolders inside one folder Open the folder’s Properties.
Only the items you can see at the current level Open the folder and check its status bar. Use Ctrl + A to count the visible items you select.
Files only, including files in nested folders Use PowerShell or Command Prompt.

Count Files and Folders in File Explorer

  1. Press Windows + E and go to the folder’s parent location.
  2. Right-click the folder and select Properties. You can also select it and press Alt + Enter.
  3. On the General tab, read the file and folder counts next to Contains. Wait for the numbers to stop changing.

To count just the files and folders at the first level together, open the folder and look at the status bar. If you select several items, the bar shows the selection count. Turn on View → Show → Hidden items in Windows 11, or View → Hidden items in Windows 10, if you want to include hidden items in that visible selection.

Count Just Files or First-Level Folders in PowerShell

Open PowerShell and change C:\Work to your folder’s path. The first count includes files at every level. The second counts the folders directly inside C:\Work.

$folder = 'C:\Work'
(Get-ChildItem -LiteralPath $folder -File -Recurse -Force | Measure-Object).Count
(Get-ChildItem -LiteralPath $folder -Directory -Force | Measure-Object).Count

-Recurse looks inside subfolders and -Force includes hidden items. For a first-level file count, remove -Recurse from the file-count command. If PowerShell reports an access error, some items may be missing from the total. Our PowerShell command guide explains how to read and combine commands like these. See Microsoft’s Get-ChildItem reference for more options.

Get a File Count in Command Prompt

Open Command Prompt and run this command with your own path. Scroll to Total Files Listed and read the File(s) count.

dir /a:-d /s "C:\Work"

Frequently Asked Questions

Does Folder Properties count files inside subfolders?

Yes. Use Contains for the nested total. The count at the bottom of an open folder is for the current view.

Does the folder itself count as a subfolder?

Contains counts folders inside the selected folder. The folder you opened Properties for is the starting point.

Can File Explorer show the count for each folder in a column?

The standard Details view doesn’t calculate a nested file count for every folder in a list. Open a folder’s Properties to see its count, or use PowerShell to count a specific folder.

Why do the File Explorer and PowerShell counts differ?

Check whether your command includes hidden items and searches all subfolders. Access errors and how folder links are handled can also change what gets counted.