Windows 10 Search by File Size on Disk

Uptix

Well-Known Member
Joined
Sep 27, 2018
Is there a way to search for files by their size on disk?

EG - on OneDrive files can be 'Available Online only', 'Available' or 'Always Available'

If they are 'Online Only' you can see the file, but it is not physically on the local disk. When you look at file properties, it shows the files real filesize, and the filesize on the local drive (zero bytes if the file is online only).

I want to search a folder, and all its subfolders for all the files that are physically on the local drive. File Explorer search by size reports the actual size of the real file, not the size of the file on the local drive.

(Yes, I can do this by viewing the icons of the files in file explorer; but I don't want to have to physically go through every folder and subfolder (there could be hundreds) looking for the 'green tick' icons!)

Thanks in advance,
Uptix
 
In the file explorer, you click in the search box. When the Search tab appears you can select one of the presets under size such as empty, tiny,small, medium, large, huge or gigantic, or you can type in values like size:60KB and you can use greater than or less than like size:>10MB or you can do ranges like size:>1MB size:<2MB
 
Thank you, Neemobeer - but the file explorer search by size returns the ACTUAL filesize, not the Filesize on disc (unless there is some way to tell it otherwise that I can't see??)

So if I have a 1MB file on onedrive, and the file is available online only, then it's filesize on disc is 0, but file explorer still returns this as 1MB (its actual size in the cloud).

To put it another way, if I search my OneDrive file tree for size:>1MB, it returns a list of ALL files in the OneDrive cloud that are 1MB or greater.

What I want to get is a list of ALL FILES in OneDrive that are size:>1MB, AND downloaded (Locally available).

Thanks
Uptix
 
There's no way to differentiate that in file explorer, you'd probably have to use Powershell.

*Update* Looks like you can search by attributes, but you'd need to figure out what the unpinned attribute constant is and search like so attributes:!## where ## is the attribute constant is
 
Last edited:
After a little digging if a file has the U attribute is available only online, so you'd need to search for files without the U attribute (Unpinned)
 
Thanks -

How do I specify an attribute I DON'T want in File Explorer?

Is it something like "attributes:-U" ???
 
Yeah thats the Hex, you'd need to convert it to decimal

0x100000h = 1048576
0x80000h = 524288
 
I recommend ditching Windows Search all together. I've been using Everything for years and loving it. Even has a portable version. Can index just about any kind of attributes you want, tons of control. You can find it over at voidtools
 
Josephur -

Oh wow! That is just so cool! It even gets the PERS seal of approval (Powerful, Elegant, Robust & Simple).

"users\<username>\onedrive\ !attrib:d !attrib:h !attrib: o"

gives me EXACTLY what I was looking for!
Thank you very muchly!
 
Last edited:
Back
Top Bottom