Find Empty Folders in Windows 10: Quick Guide
In this article
You can find empty folders in Windows 10 by using the built-in Command Prompt with a specific search command, or by using third-party software for more advanced filtering. The Command Prompt method is free, requires no installation, and works instantly on any folder or drive.
What You'll Need
- A Windows 10 PC with administrative access (recommended for scanning system folders).
- Basic familiarity with opening the Command Prompt.
- (Optional) A third-party utility like TreeSize Free or Bulk Crap Uninstaller if you need to delete thousands of empty folders quickly.
Step-by-Step
- Open Command Prompt as Administrator: Press the
Windows Key + Sto open the search bar. Typecmd. In the search results, right-click on Command Prompt and select Run as administrator. If prompted by User Account Control, click Yes. - Navigate to the Target Drive: If you want to scan your entire C: drive, type
C:and press Enter. If you only want to scan a specific folder (like Documents), navigate there first using thecdcommand (e.g.,cd C:\Users\YourName\Documents). Note that menu labels may differ slightly depending on your Windows 10 version build. - Enter the Search Command: To find all empty folders within the current directory and its subdirectories, type the following command exactly and press Enter:
for /f "delims=" %d in ('dir /s /b /ad') do @if exist "%d\*.*" (echo Not Empty: %d) else (echo Empty: %d) - Review the Output: The command will list every folder it encounters. Folders containing files or other folders will be labeled "Not Empty." Folders with nothing inside them will be labeled "Empty." This process may take several minutes depending on the size of the drive.
- Export Results (Optional): If the list is long, you can redirect the output to a text file by adding
> empty_folders.txtto the end of the command in step 3. This saves the list to your current directory for easy reading.
Common Mistakes
Ignoring Hidden Files: By default, the standard dir command does not show hidden files. If you suspect empty folders are actually hiding system files, use the /a switch in the directory command, though this complicates the one-liner significantly. For most users, standard visibility is sufficient.
Running Without Admin Rights: If you try to scan the root of the C: drive without administrator privileges, Windows will block access to many system folders (like Windows or Program Files). You will get "Access Denied" errors for those specific paths, leaving gaps in your results. Always run as admin for full scans.
Deleting Too Quickly: Do not blindly delete every folder listed as "Empty." Some applications create placeholder folders during installation or update processes. Deleting these can cause software to crash or fail to launch. Always verify the folder name before deleting.
Tips
Use Third-Party Tools for Large Drives: The Command Prompt method is great for quick checks, but it generates a massive text list for large drives. Tools like TreeSize Free or WizTree provide a visual map of your disk space. While they don't have a direct "find empty folders" button, they allow you to sort by size and easily spot directories that are suspiciously small or zero bytes.
Check for "Ghost" Folders: Sometimes a folder appears empty in File Explorer but isn't truly empty due to permission issues. If you cannot open a folder, it might look empty but contain files you don't have access to. Use the icacls command to check permissions if you suspect this.
Backup Before Mass Deletion: If you plan to delete hundreds of empty folders, consider moving them to a single "Cleanup" folder first rather than deleting them immediately. This allows you to restore them if an application complains later.
Troubleshooting
Command Returns "Access Denied": This means you did not run Command Prompt as an administrator. Close the window, right-click the Start button, select Terminal (Admin) or Command Prompt (Admin), and try again.
The List Is Cut Off: The Command Prompt window has a default buffer limit. If you see "-- More --" at the bottom, press Spacebar to scroll down or Q to quit. To avoid this, redirect the output to a file as described in Step 5.
No Empty Folders Found: If you are certain there are empty folders but the command finds none, ensure you are looking in the correct directory. Use cd to navigate to the parent folder of the empty directory you expect to find.
Frequently Asked Questions
Can I find empty folders using just File Explorer?
No. Windows File Explorer does not have a native filter or view option to display only empty folders. You must use Command Prompt, PowerShell, or third-party software.
Is the Command Prompt method safe?
Yes. The command provided only reads and lists folder contents. It does not delete anything unless you manually add a deletion command (which is not recommended for beginners).
How do I delete all empty folders automatically?
You can modify the Command Prompt command to include a deletion flag, but this is risky. A safer approach is to use the list generated by the command, identify the folders you want to remove, and delete them manually via File Explorer.
Does this work on Windows 11?
Yes. The Command Prompt syntax used here is compatible with Windows 7, 8, 10, and 11.
Why are some folders showing as empty but contain files?
This usually happens due to permission restrictions. If you do not have read access to a subfolder, the command cannot see the files inside and assumes the folder is empty. Running as Administrator resolves most of these cases.