If the capacity of your hard drive is running low, it is time to clean off some files and to find large files on windows. First of all, we have to identify the biggest “space consumers” and there are a couple of ways to do this. The methods below work for all windows versions including windows 10.
Three methods to find large files on windows
Method 1: Using Windows Explorer
You can use windows search to find big files on your computer. To ensure that all files will display, first unhide hidden folders.
Step 1: Type “Show hidden” and click on the “Show Hidden Files and Folders” option.
Step 2: In the “View” tab of the window that opens, under “Files and Folders,” check “Show hidden files, folders, and drives.” Reverse this process when you’re finished.
Step 3:
- Press Win+F to bring forth the Windows Search window.
- Click the mouse in the Search text box in the upper-right corner of the window.
- Type size:gigantic
Select a size range. Click the option that best describes the file sizes you’re looking for. Once you make your selection, a list of files will appear.
- Gigantic will display files larger than 128 MB.
- Huge will display files larger than 16 MB but smaller than 128 MB.
- Large will display files larger than 1 MB but smaller than 16 MB.
The search will take some time and show a green progress bar in the address field since it is searching the entire C: drive. In newer versions of Windows, like Windows 10, the size option shows up in the ribbon and not in the search box anymore.
Method 2: Using Cmd – forfiles commands
In this method, we will explain how to find big files using command prompt, forfiles command. Below you have some examples when you need to show files with size 1MB. 100MB, 1GB or more.
How to find large files with a size of 1 MB or more:
forfiles /S /M * /C “cmd /c if @fsize GEQ 1048576 echo @path”
Example:
E:\>forfiles /S /M * /C "cmd /c if @fsize GEQ 1048576 echo @path" "E:\export-GWG01-24032017-22h00.dmp" "E:\Xming.zip" "E:\AgentInstaller_Win64\AgentInstall64.msi" "E:\Dekstop_20200121\extract.csv" "E:\Dekstop_20200121\SpaceSniffer.exe"
This command prints the complete file path. If you need to print just the file name, you can use @file in place of @path.
Command to find files with a size of more than 100MB:
forfiles /S /M * /C "cmd /c if @fsize GEQ 104857600 echo @path"
Find files with size 1 GB or more:
forfiles /S /M * /C "cmd /c if @fsize GEQ 1073741824 echo @path"
For those wanting top 10 files, redirect output to a text file:
forfiles /S /M * /C “cmd /c if @fsize GEQ 1073741824 echo @path > bigfiles.txt”
The command is going to locate all files larger than 1GB and create a text document titled “bigfiles.txt” with their locations. You can then open in excel and sort or use a text editor to weed out the files you don’t want
Method 3: Find large files on windows using Powershell
The below PowerShell script is prepared from “Hey Scripting Guy” at https://gallery.technet.microsoft.com/scriptcenter.
The script uses two command line parameters: path and first that you can either modify directly or change from the command line. The path parameter specifies the search root, and the first parameter determines how many folders will be returned.
# --------------------------------------------------------- # ScriptingGamesBeginnerEvent8_PS1.ps1 # ed wilson, msft 8/21/2009 # PS1 version of HSG-08-19-09 http://bit.ly/1d8Rww # # --------------------------------------------------------- Param( [string]$path = "c:\fso", [int]$first = 5 )# end param # *** Function Here *** function Get-DirSize ($path){ BEGIN {} PROCESS{ $size = 0 $folders = @() foreach ($file in (Get-ChildItem $path -Force -ea SilentlyContinue)) { if ($file.PSIsContainer) { $subfolders = @(Get-DirSize $file.FullName) $size += $subfolders[-1].Size $folders += $subfolders } else { $size += $file.Length } } $object = New-Object -TypeName PSObject $object | Add-Member -MemberType NoteProperty -Name Folder ` -Value (Get-Item $path).FullName $object | Add-Member -MemberType NoteProperty -Name Size -Value $size $folders += $object Write-Output $folders } END {} } # end function Get-DirSize Function Get-FormattedNumber($size) { IF($size -ge 1GB) { "{0:n2}" -f ($size / 1GB) + " GigaBytes" } ELSEIF($size -ge 1MB) { "{0:n2}" -f ($size / 1MB) + " MegaBytes" } ELSE { "{0:n2}" -f ($size / 1KB) + " KiloBytes" } } #end function Get-FormattedNumber # *** Entry Point to Script *** if(-not(Test-Path -Path $path)) { Write-Host -ForegroundColor red "Unable to locate $path" Help $MyInvocation.InvocationName -full exit } Get-DirSize -path $path | Sort-Object -Property size -Descending | Select-Object -Property folder, size -First $first | Format-Table -Property Folder, @{ Label="Size of Folder" ; Expression = {Get-FormattedNumber($_.size)} }
Method 4: Find Big Files Windows using a third-party program
You can find big files on Windows using a third-party program such as Space Sniffer. Space Sniffer can show you the biggest files and folders. You can download it here http://www.uderzo.it/main_products/space_sniffer/
SpaceSniffer is a freeware and portable tool application. It lets you understand how folders and files are structured on your disks.
- Double click and run SpaceSniffer.exe as an administrator to have an access to all folders and files.
- Choose your space by clicking on one of the drives and click Start:
- SpaceSniffer will start to scan and by using a Treemap visualization layout, you have an immediate perception of where big folders and files are placed on your devices.
- If you need a larger view of a small folder then double click on it, and it’ll zoom to the full extent of the view.
One of the largest consumers of disc space on Windows Clients are all the outdated and redundant files installed in the Component Store are stored in the WinSxS directory. You can read more about how to delete windows update files in our previous article
In the above discussion, there are two methods on how to find big files on windows. Comment below if you have any other solution.