Find Large Files in Windows 10 Without Third-Party Tools

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

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:File Explorer Search Ribbon

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

File Explorer Search Options

Pick a suitable option for you and you are done.

File Explorer Search In Action

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:


File Explorer Search Custom Filter

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

if /?

If HelpThe output includes a long list of options. The most interesting for us is the portion about compare operations. They are as follows:
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

forfiles /?

Forfiles Help

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"

Windows 10 Find Large Files

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.

That's it.

3 thoughts on “Find Large Files in Windows 10 Without Third-Party Tools

  1. Juhani Suhonen

    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.

  2. throkr

    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 … :-)

  3. Tim Eckel

    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.


Leave a Reply

Your email address will not be published. Required fields are marked *