Key Points
- Use attributes:compressed in File Explorer for quick checks, Advanced Query Syntax (AQS) for targeted searches, and PowerShell (Get-ChildItem with Compressed attribute) for full-drive or multi-device scans.
- NTFS compression, ZIP/7z/RAR archives, and OneDrive Files On-Demand files are indexed differently, impacting Windows 11 search, audits, and storage reviews.
- Run scheduled PowerShell scans, use compact.exe for summaries, export to CSV, and centralize reporting with RMM tools to control storage growth and reduce compliance risk.
Compressed files show up everywhere in IT operations. You’ll run into them during audits, storage cleanups, incident response, and even routine troubleshooting. A user can’t open an archive. A backup folder suddenly balloons in size. A developer compresses logs to save space. And now you need to find what’s compressed, where it lives, and whether it belongs there.
Windows 11 gives you several ways to find compressed files quickly, but the right method depends on what you’re looking for. NTFS compression behaves differently from ZIP archives, and cloud-synced files introduce another layer of complexity.
Below are practical ways to locate compressed files and folders in Windows 11.
Understanding compressed files in Windows 11
Before you start searching, it helps to know what “compressed” actually means in Windows. Most IT teams deal with three common scenarios:
- NTFS compression: A file system attribute applied directly to files or folders on an NTFS volume. Windows treats these like normal files, and they’re usually indexed and searchable.
- ZIP and archive files: These are container formats such as .zip, .7z, or .rar. Windows can open ZIP files natively, but Search usually only indexes the archive itself, not the contents inside.
- OneDrive cloud placeholders: With Files On-Demand, Windows shows files that aren’t fully stored on the device. You may see them in search results, but content scans won’t work until the file is downloaded locally.
These differences matter because they affect what Windows can find, what gets indexed, and what PowerShell can report.
Where are compressed files stored in Windows 11
Windows doesn’t store compressed files in a single dedicated location. Where you find them depends on how they were compressed and who created them.
NTFS-compressed files can live anywhere on an NTFS drive, including user profiles, shared folders, application directories, or archived project data. ZIP and other archive files are usually saved in the user’s most frequently used location: Downloads, Desktop, Documents, or network shares.
Cloud storage adds another layer of complexity. With OneDrive Files On-Demand, Windows may show compressed files in search results even if the content isn’t fully stored on the device yet. That means you might see the archive name, but scanning or inspecting its contents won’t work until it’s downloaded locally.
Here are a few quick settings that make compressed files much easier to spot:
- Enable File Explorer color-coding so NTFS-compressed files stand out visually
- Review Indexing Options to make common audit paths searchable
- Ensure OneDrive folders are available offline so you can get reliable scan results.
These steps won’t move compressed files, but they make them easier to consistently find during audits, troubleshooting, or storage reviews.
How to filter search in File Explorer to find compressed files
File Explorer is often enough for quick checks, especially when you’re investigating a specific folder or share. The key is knowing how to filter searches in File Explorer properly.
Filtering compressed files in File Explorer
Start in the folder you want to review, then use the search box in the upper-right corner.
- To find NTFS-compressed items, run: attributes:compressed
- To narrow results further:
- Compressed folders only: attributes:compressed kind:=folder
- Large compressed files: attributes:compressed size:>50MB
- Recent compressed items: attributes:compressed datemodified:this year
You can also add the Attributes column in the “Details” view to confirm compression visually. File Explorer works best in indexed locations. Searches may slow down in non-indexed paths or when OneDrive files aren’t stored locally.
Using advanced search queries to find compressed files
Advanced Query Syntax (AQS) helps you turn one-off searches into repeatable checks you can run anytime. It’s especially useful when you need consistent results for audits, storage reviews, or troubleshooting across multiple machines.
For example, you can narrow your search to specific locations or file types:
- Compressed files in user profiles:
attributes:compressed path:%userprofile% - Large compressed log files older than 90 days:
attributes:compressed ext:log size:>100MB datemodified:<90days - Exclude noisy system folders to focus on business data:
attributes:compressed NOT path:C:\Windows
Once you find a query that works, save it as a .search-ms file. That way, your team can rerun the same search during future audits instead of rebuilding filters from scratch.
Using PowerShell to find compressed files
File Explorer works well for quick spot checks, but PowerShell is a better fit when you need a complete inventory or a process you can repeat consistently. It lets you scan entire drives, export results for reporting, and run the same discovery across multiple endpoints without relying on manual searches.
Finding NTFS-compressed files with PowerShell
PowerShell can detect NTFS-compressed files by checking the Compressed attribute directly. This gives you a full list of files and folders where compression is enabled:
Get-ChildItem -Path C:\ -Recurse -Force -ErrorAction SilentlyContinue |
Where-Object { $_.Attributes -band [IO.FileAttributes]::Compressed } |
Select-Object FullName, Length, Attributes, LastWriteTime
If you need results you can share with auditors or review in Excel, export the output to CSV:
$results = Get-ChildItem -Path C:\ -Recurse -Force -ErrorAction SilentlyContinue |
Where-Object { $_.Attributes -band [IO.FileAttributes]::Compressed }
$results | Export-Csv -NoTypeInformation -Path C:\Temp\CompressedFiles.csv
For a quick built-in summary that also shows compression ratios, Windows includes compact.exe, which is often easier to read during storage reviews:
cmd /c “compact /Q /S:C:\” | Out-File C:\Temp\CompactReport.txt
Finding ZIP and container-compressed files
To locate archive-based compressed files, start by searching for common container extensions like .zip, .7z, and .rar:
Get-ChildItem -Path C:\ -Recurse -Force -Include *.zip,*.7z,*.rar |
Select-Object FullName, Length, Extension, LastWriteTime
You can also inspect ZIP contents without extracting:
Add-Type -AssemblyName System.IO.Compression.FileSystem
Get-ChildItem -Path C:\Projects -Filter *.zip | ForEach-Object {
$zip = [System.IO.Compression.ZipFile]::OpenRead($_.FullName)
$zip.Entries | Select-Object FullName, Length
$zip.Dispose()
}
How to get access to compressed files at scale
When you need discovery across hundreds of endpoints, consistency matters most. Run the same scan everywhere, centralize the output, and rely on automation instead of one-off searches. PowerShell Remoting works well in domain environments, and an RMM can take it further by automating scan scheduling and result collection across your fleet.
A simple remoting pattern looks like this:
Invoke-Command -ComputerName $computers -ScriptBlock {
Get-ChildItem -Path C:\ -Recurse -Force |
Where-Object { $_.Attributes -band [IO.FileAttributes]::Compressed } |
Export-Csv -NoTypeInformation -Path C:\Windows\Temp\CompressedFiles.csv
}
If your team is unsure how to get access to compressed files at scale, the answer is to codify discovery, schedule it, and store the results centrally.
Find compressed files faster
To find compressed files in Windows 11, always try to match the method to the job. Use File Explorer filters like attributes:compressed for fast checks, AQS queries for repeatable audits, and PowerShell when you need full inventories across NTFS compression and archive formats.
Compressed data often hides in plain sight, especially across user folders, shared drives, and cloud-synced libraries. The more consistent your discovery process is, the easier it becomes to control storage growth, reduce audit surprises, and spot risky archives before they become a problem.
Centralize compressed file discovery across your fleet
NinjaOne helps you manage endpoint visibility, automation, and reporting through a single platform. You can run scheduled PowerShell scans, collect results centrally, and maintain consistent discovery workflows across every Windows device you support.
Try NinjaOne free to see how centralized IT management makes compressed file auditing and storage discovery easier to maintain at scale.
