sodcalculator

10 Tech How-To

How to Search for Empty Folders in Windows 11

Guide 10-59860 · Updated · Step by step

Empty folders clutter your drive and make navigation confusing. This guide shows you several ways to find them in Windows 11, using built-in tools and a simple PowerShell script. No extra software is needed.

What You’ll Need

  • A Windows 11 PC with administrator access (recommended for scanning system folders).
  • Basic comfort with File Explorer and Command Prompt or PowerShell.
  • Time – scanning large drives can take a few minutes.

Step-by-Step

Method 1: Using File Explorer Search (Quick but Limited)

  1. Open File Explorer (Win + E).
  2. Navigate to the drive or folder you want to scan (e.g., C:\).
  3. In the search box (top right), type kind:folder and press Enter. This shows all folders, but not just empty ones.
  4. To narrow down, click the Search options tab (appears after you search), then select Size and choose Empty (0 KB). This filters folders with zero size – these are empty or contain only empty subfolders.
  5. Review the results. You can sort by Date modified to see which are old and likely safe to delete.

Note: This method may miss folders that contain only hidden files or system files. It’s also slow on very large drives.

Method 2: Using PowerShell (Accurate and Fast)

  1. Press Win, type PowerShell, right-click Windows PowerShell, and select Run as administrator.
  2. In the PowerShell window, copy and paste the following command, then press Enter:
Get-ChildItem -Path C:\ -Recurse -Directory | Where-Object { $_.GetFiles().Count -eq 0 -and $_.GetDirectories().Count -eq 0 } | Select-Object FullName
  1. Replace C:\ with the drive or folder you want to scan (e.g., D:\ or C:\Users\YourName\Documents).
  2. Press Enter. PowerShell will list every folder that contains no files and no subfolders.
  3. To save the list to a text file, add | Out-File -FilePath C:\empty_folders.txt at the end of the command.

Method 3: Using Command Prompt with Robocopy (Alternative)

  1. Open Command Prompt as administrator (Win + R, type cmd, press Ctrl+Shift+Enter).
  2. Run this command to list empty folders:
robocopy C:\ C:\EmptyScan /L /S /NJH /NJS /FP /NDL /NC /NS /NP

This is a dry-run that lists all folders, but it doesn’t directly show empty ones. Instead, use this simpler one:

for /d /r "C:\" %d in (*) do @dir "%d" /a /b | findstr /r "^" >nul || echo %d
  1. Press Enter. This will output each empty folder’s full path.

Method 4: Using a Third-Party Tool (Optional)

If you prefer a graphical interface, tools like WizTree or Empty Folder Cleaner can scan and show empty folders with one click. Download from official sites, run the scan, and review the list before deleting.

Common Mistakes

  • Not running as administrator: Without admin rights, you may get access denied errors on system folders.
  • Deleting folders that appear empty but contain hidden files: Use File Explorer’s “View > Show > Hidden items” to check before deleting.
  • Scanning the entire C: drive: This takes a long time and may include system folders you shouldn’t touch. Scan specific user folders instead.
  • Misunderstanding the PowerShell command: The command above only finds folders with zero files AND zero subfolders. If a folder contains only empty subfolders, it won’t be listed (it has subfolders).

Tips

  • Always back up important data before deleting anything.
  • Sort the results by date modified to focus on old folders that are more likely to be obsolete.
  • Use the PowerShell command with a specific path (like D:\Downloads) to avoid scanning system areas.
  • To delete empty folders automatically, you can pipe the results to Remove-Item, but test with a dummy folder first.

Troubleshooting

PowerShell returns “Access Denied” errors: Run PowerShell as administrator. If the issue persists, you’re scanning protected system folders (like C:\Windows). Skip those or use a different path.

The search in File Explorer shows no results: Make sure you typed kind:folder and then applied the size filter. If still nothing, the folder might be indexed – rebuild the index by going to Settings > Privacy & Security > Searching Windows.

The command prompt method shows nothing: The for loop syntax may not work in all environments. Use the PowerShell method instead – it’s more reliable.

Results are too many to review: Use the Out-File option to save to a text file, then open it in Notepad or Excel.

Frequently Asked Questions

Can I delete empty folders without affecting my system?

Generally yes, but avoid deleting folders in C:\Windows or Program Files unless you’re sure they’re not needed. Stick to user folders like Documents, Downloads, or Desktop.

Why do empty folders keep coming back?

Some apps recreate folders on startup. Check your startup programs and disable any that create empty directories.

Does Windows 11 have a built-in tool to find empty folders?

No, but File Explorer’s search and PowerShell work well without extra software.

How long does a full drive scan take?

It depends on drive size and speed. A 1TB HDD can take 10-20 minutes; an SSD is faster. Scan specific folders to save time.

Can I undo a mistake if I delete the wrong folder?

If you delete a folder that had files, it goes to the Recycle Bin (unless you used Shift+Delete). Empty folders don’t go to the Recycle Bin, so be careful.

Is it safe to use third-party tools?

Yes, but download from official websites and scan with antivirus. Stick to well-known tools with good reviews.

Related

General steps for current mainstream versions; menus can differ by device and version. See the disclaimer or report an error.

More in this bed

The whole Tech How-To bed →