📎 AI Summary:
The thread discusses how to search for local files on Windows, specifically distinguishing between file size and whether files are stored locally or only online via OneDrive. The original poster seeks a method to find files that are physically on the disk and larger than a certain size, but Windows File Explorer's search by size only shows actual file size, not disk presence or online status. Contributors suggest using PowerShell commands or attribute-based searches, but ultimately recommend using third-party tools like Everything for more precise and flexible searching. The overall sentiment favors manual and advanced tools over basic Windows search for this specific need.

Uptix

Honorable Member
Joined
Sep 27, 2018
Messages
5
Thread Author #1
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
 

Solution
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

Neemobeer

Windows Forum Team
Staff member
Joined
Jul 4, 2015
Messages
8,995
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
 

Uptix

Honorable Member
Joined
Sep 27, 2018
Messages
5
Thread Author #3
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
 

Neemobeer

Windows Forum Team
Staff member
Joined
Jul 4, 2015
Messages
8,995
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:

Neemobeer

Windows Forum Team
Staff member
Joined
Jul 4, 2015
Messages
8,995
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)
 

Uptix

Honorable Member
Joined
Sep 27, 2018
Messages
5
Thread Author #6
Thanks -

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

Is it something like "attributes:-U" ???
 

Neemobeer

Windows Forum Team
Staff member
Joined
Jul 4, 2015
Messages
8,995
Yeah thats the Hex, you'd need to convert it to decimal

0x100000h = 1048576
0x80000h = 524288
 

Josephur

Windows Forum Admin
Staff member
Premium Supporter
Microsoft Certified Professional
Joined
Aug 3, 2010
Messages
1,283
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
 

Solution

Uptix

Honorable Member
Joined
Sep 27, 2018
Messages
5
Thread Author #11
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: