Previously, I wrote how to find the largest file and directory in Linux. Today, I would like to offer you a solution for Windows. It does not rely on third party tools. We'll use only the built-in features available in every modern Windows installation.
To find large files in Windows 10, you can use one of the two methods described below.
Table of contents.
- Find Large Files in Windows 10 with File Explorer
- Find Large Files in Windows 10 with Command Prompt
- Find Large Folders in Windows Settings
Find Large Files in Windows 10 with File Explorer
The first method to find large files is with File Explorer. The default file manager app in Windows 10 has a special search box. When it gets focused, it shows a number of advanced options in the Ribbon.
To activate the search feature in File Explorer, click on the search box or press F3 on the keyboard. The Ribbon will look as follows:
On the Ribbon, look at the "Size" button. It is a drop down list using which you can create a filter for searching by file size. It supports the following options:
Empty (0 KB)
Tiny (0 – 10 KB)
Small (10 – 100 KB)
Medium (100 KB – 1 MB)
Large (1 – 16 MB)
Huge (16 – 128 MB)
Gigantic (> 128 MB)
Update: Starting in Windows 10 version 1809, the size definitions have been updated: Tiny, Small, Medium, Large, Huge and Gigantic are now defined as 0 – 16KB, 16KB – 1MB, 1 MB to 128 MB, 128 MB – 1 GB, 1 GB – 4 GB, and > 4 GB
Pick a suitable option for you and you are done.
Tip: You can use your own, custom size filters. All you need is type the desired filter condition in the search box of File Explorer as follows:
This will allow you to find files larger than 2 Gigabytes. You can specify the size in KB, MB, GB etc. For example, you can enter 5KB, 10GB or 10MB. This way you can search for big files and prevent your device from running out of disk space.
Find Large Files in Windows 10 using Command Prompt
Like in Linux, a couple of useful commands are available in Windows. You can use them to find large files quickly.
The first command is a well known command "if". It is a console command which allows building conditional branches in batch files. You can learn more about it using its built-in help. Open the command prompt and type
EQU - equal
NEQ - not equal
LSS - less than
LEQ - less than or equal
GTR - greater than
GEQ - greater than or equal
We can use them to analyze the size of files. The code construction can look as follows:
IF file_size_value GTR some_other_value_tocompare some_action_here.
We need to pass the file_size_value to find large files. Another built-in command which is specially designed for tasks like this will help us. It is forfiles. This command selects a file (or set of files) and executes a command on that file.
To learn more about it, execute
The most interesting switches in our case are:
/S - This switch makes forfiles recurse into subdirectories. Like "DIR /S".
/C <command> - This command specifies the command to execute on each file that will be found. Command strings should be wrapped in double quotes.
The default command is "cmd /c echo @file".
The following variables can be used in the command string:
@file - returns the name of the file.
@fname - returns the file name without extension.
@ext - returns only the extension of the file.
@path - returns the full path of the file.
@relpath - returns the relative path of the file.
@isdir - returns "TRUE" if a file type is
a directory, and "FALSE" for files.
@fsize - returns the size of the file in bytes.
@fdate - returns the last modified date of the file.
@ftime - returns the last modified time of the file.
To include special characters in the command line, use the hexadecimal code for the character in 0xHH format (ex. 0x09 for tab). Internal CMD.exe commands should be preceded with "cmd /c".
Using this information, we can run the following command to find large files.
forfiles /S /C "cmd /c if @fsize GTR 1048576 echo @path"
This will recursively find all files larger than 1 Megabyte in the current folder and its subfolders! Modify the command according to your preferences and you are done.
Find large folders using the Settings app
You can open Windows 10 Settings, and browse it to the "System" > "Storage" section. There, you will find detailed information about the occupied disk space and a list of categories.
If you click on the "Show more categories" link, the information will become even more detailed.
Here, click on each item in the category to view advanced details information about the occupied space.
As for our task, the "Other" category will show the necessary information about large folders. Click it to see the largest folders on your drive.
Please keep in mind that this tools doesn't count the contents of system folders. It operates with user data only.
Winaero greatly relies on your support. You can help the site keep bringing you interesting and useful content and software by using these options:
too bad Windows has crippled explorer search after Windows 7 :( :(
Although searching for files still work, search box is stupendously small (for any regex), frequently
used search terms can not be saved and search does not work with Outlook as it used
to do with windows 7.
Thank you, Sergey, for this useful tip !
I didn’t know that clicking on the search box would bring up such a smart menu; nice discovery … :-)
cmd /c if @fsize doesn’t work for searching for files larger than about 2GB. Searching for large movies of over 8GB for example will show all results.
Thanks for the useful information. These methods actually work. In addition to this, I would like to recommend a program for viewing the contents of the hard drive. This is Disk Usage Analyzer Free. https://manyprog.com/disk-usage-analyzer.php
I use Directory Report to find large files and large directories
It looks like the MS-Explorer but always shows the folder size
This makes it easy to drill down to folders which are using your space