Pass File Size To Button?

Oh, ok. It almost works.
Everything works except Ctrl held down with certain folder sizes. This is becoming a minor bug issue, so I don't think I'll bother you about it further, unless you want to keep worrying about it.

I studied if the Everything USN Journal size is involved, but I don't think so.
Checked the folder properties etc. and they are all the same.

New button (that you linked in your last reply).
Folder is selected, there is another one that is the same size. Nothing happens.
(Folders size: 47.7kb doesn't work. Size: 66 bytes does work. Size: 2.66 MB doesn't work.)
Log:

 01-May-25 11:27:AM LogicRun:  INFO    => === COMMAND BEGIN ===
 01-May-25 11:27:AM LogicRun:  DEBUG   => cmdline              : LogicRun IN "C:\Users\me\Pictures\Pics\Forums\" GETPROPS USEEVERYTHING folder:size:$(sizeautoEV)$ 
 01-May-25 11:27:AM LogicRun:  DEBUG   => COMMANDS             : true
 01-May-25 11:27:AM LogicRun:  DEBUG   => USEEVERYTHING        : folder:size:$(sizeautoEV)$ 
 01-May-25 11:27:AM LogicRun:  DEBUG   => FILTER               : false
 01-May-25 11:27:AM LogicRun:  DEBUG   => FILTERDEF            : false
 01-May-25 11:27:AM LogicRun:  DEBUG   => GET PROPS            : 0
 01-May-25 11:27:AM LogicRun:  INFO    => Validating 1 entries...
 01-May-25 11:27:AM LogicRun:  INFO    => Expanding filter...
 01-May-25 11:27:AM LogicRun:  INFO    => Getting values for "sizeautoEV"...
 01-May-25 11:27:AM LogicRun:  DEBUG   => QUERY                : folder:size:47.7KB
 01-May-25 11:27:AM LogicRun:  INFO    => Getting files using Everything...
 01-May-25 11:27:AM LogicRun:  DEBUG   => ==> EV is running:true; autorun:false
 01-May-25 11:27:AM LogicRun:  DEBUG   => ==> Waiting for EV database to be loaded: 1
 01-May-25 11:27:AM LogicRun:  DEBUG   => QUERY                :  < <C:\Users\me\Pictures\Pics\Forums\>> folder:size:47.7KB !path:"$Recycle.Bin"
 01-May-25 11:27:AM LogicRun:  DEBUG   => ==> Query finished, results: 0
 01-May-25 11:27:AM LogicRun:  INFO    => ITEMS                : 1
 01-May-25 11:27:AM LogicRun:  INFO    => RESULTS              : 1
 01-May-25 11:27:AM LogicRun:  INFO    => Running command(s) in 1 file(s)...
 01-May-25 11:27:AM LogicRun:  DEBUG   => => Select FROMSCRIPT DESELECTNOMATCH
 01-May-25 11:27:AM LogicRun:  INFO    => ==> Command "Select FROMSCRIPT DESELECTNOMATCH" succesfully executed
 01-May-25 11:27:AM LogicRun:  INFO    => === COMMAND END ===

Then there’s definitely something off with your Everything config since it’s returning zero results (Query finished, results: 0). At least I can say that the command is working as expected :slightly_smiling_face:

Try pasting this search into the Everything window and upload a screenshot of the result:

< <C:\Users\me\Pictures\Pics\Forums\>> folder:size:47.7KB !path:"$Recycle.Bin"

BTW, thanks for the feedback—it’s greatly appreciated! This kind of input really helps iron out the details.

Oh, I thought I was the one bugging you.

No results.

I'll have another look at my Everything options but I already looked many times already. Don't know what I'm looking for either.

Probably you should look for the folders you mentioned that are 47.7 KB and see what size Everything actually shows, if anything.

Good point. They are all being rounded to MB. So the ones that are working and also not working are all 1 MB. Other ones that are working (2.66MB) show as 3MB. Which is strange because none of them should work. I'm not seeing any size rounding options in Everything.

So wait—are you saying a folder that’s actually 47.7 KB is being rounded up to 1 MB in Everything? And that only happens for folders? That sounds completely off.
Probably you change something in Everything's Advanced Options regarding sizes?
FWIW, I see the exact same sizes in both Opus and Everything. But if you’ve got "Get folder sizes from Everything" enabled in Opus, then Opus will show the same (incorrect) numbers which will be very irritating, at least to me. Even more than collections :grinning_face:
You can try using the command without Everything being involved.

The advanced options has our answer.

The size rounds to the floor. Floor means the nearest lowest.
Since the size_tiny is 1024, that means anything smaller than 1MB rounds to 1MB, being the floor. So I'm not sure if I should mess with these options.

Not sure what Auto_Size means either. I'll look to see if this is in the manual.
Auto Size

None of those options seem to have been changed from their defaults (changed values are highlighted in red).

On a side note, I think I’ve discovered an issue with retrieving folder sizes under certain conditions—that might be why comparisons fail. I’ll try to reproduce it and inform Jon/Leo about it.

1 Like

Ya those options are at the default. I think it would explain why "retrieve sizes from Everything" results in incorrect sizes too. I'll have a look to see if I should change some things or just leave it as is.

Alright, here's a "size" word search on the relevant document.
Size Auto is for the window.

I'm pretty sure he got rid of these, just putting them in the main NTFS options, but didn't update the document. Either way they aren't there (in the advanced options).


Size Fold Index

This isn't there either. I assume it's 0 by default (best format), because the measurement does change based on the size.

I don't think this is relevant. It's just the Everything status bar, showing on the bottom right.

"Size Tiny" is just an alias for searching.

And I still have no idea if Everything is rounding sizes, causing this problem.
Read the manual they said. It will be fun they said. :roll_eyes:

Guess I could ask him.

The VoidTools dev got back to me.
His reply:

The Everything SDK/IPC always uses sizes in bytes. (Directory Opus)

The size options and advanced size options only affect the view of sizes in the main Everything window.

Please try changing your size format in Everything:
In Everything, from the Tools menu, click Options.
Click the View tab.
Change size format to: Bytes.
(I assume this was MB)
Click OK.
Check your sizes are the same.



If you prefer to keep sizes in MB, consider changing your size number format:
In Everything 1.5, from the Tools menu, click Options.
Click the Advanced tab on the left.
To the right of Show settings containing, search for:
size
Select: size_number_format
Set the value to: 3 digits
Click OK.

So I changed my view size to auto.

So my sizes are looking normal again.

But in the reply the dev says that wouldn't affect the data passed to Dopus. At least we know why I was getting "1 MB" results in the Everything search.

The (hold Ctrl = folders only) problem is still the same.

  1. Try this new version (it includes a few tweaks for better debugging and a faster Everything query) : LogicRun.opusscriptinstall (6.9 KB)

  2. Use this button to test it:

@evalalways:=type = KeyDown("ctrl") ? "folder:" : KeyDown("shift") ? "file:" : "";
LogicRun IN {sourcepath$} GETPROPS USEEVERYTHING {=type+"size:$(sizeautoEV)$"=}
[[
COMMANDS
Select FROMSCRIPT DESELECTNOMATCH
]]
  1. Post your script log.
  2. Copy the Everything query from the script log (the part that start with !path:"$Recycle.Bin" <c:\some_path\> folder:size:xzKB), paste it into the Everything window, and share a screenshot of the results.
1 Like

Ok. I set up a test folder with a bunch of dedicated test subjects.
Left clicking on a larger file works fine. Shift + click works fine too.

The log:

 03-May-25 10:04:PM LogicRun:  INFO    => === COMMAND BEGIN ===
 03-May-25 10:04:PM LogicRun:  DEBUG   => cmdline              : LogicRun IN "C:\Users\hi\Pictures\hi there\Forums\Test Folder\" GETPROPS USEEVERYTHING size:$(sizeautoEV)$
 03-May-25 10:04:PM LogicRun:  DEBUG   => COMMANDS             : true
 03-May-25 10:04:PM LogicRun:  DEBUG   => USEEVERYTHING        : size:$(sizeautoEV)$
 03-May-25 10:04:PM LogicRun:  DEBUG   => FILTER               : false
 03-May-25 10:04:PM LogicRun:  DEBUG   => FILTERDEF            : false
 03-May-25 10:04:PM LogicRun:  INFO    => Expanding filter...
 03-May-25 10:04:PM LogicRun:  DEBUG   =>  => Getting values for "sizeautoEV" for 1 items...
 03-May-25 10:04:PM LogicRun:  INFO    => Getting files using Everything...
 03-May-25 10:04:PM LogicRun:  DEBUG   => ==> EV is running:true; autorun:false
 03-May-25 10:04:PM LogicRun:  DEBUG   => ==> Waiting for EV database to be loaded: 1
 03-May-25 10:04:PM LogicRun:  DEBUG   => => file : C:\Users\trevr\Pictures\TJ Pics\Forums\Test Folder\
 03-May-25 10:04:PM LogicRun:  DEBUG   => QUERY                : !path:"$Recycle.Bin"  <C:\Users\hi\Pictures\hi there\Forums\Test Folder\> size:100KB
 03-May-25 10:04:PM LogicRun:  DEBUG   => ==> Query finished. Results=3
 03-May-25 10:04:PM LogicRun:  INFO    => ITEMS TO FILTER      : 3
 03-May-25 10:04:PM LogicRun:  DEBUG   => No filter defined. Items just pass through...
 03-May-25 10:04:PM LogicRun:  INFO    => RESULTS FROM FILTER  : 3
 03-May-25 10:04:PM LogicRun:  INFO    => Running command(s) in 3 file(s)...
 03-May-25 10:04:PM LogicRun:  DEBUG   => => Select FROMSCRIPT DESELECTNOMATCH
 03-May-25 10:04:PM LogicRun:  INFO    => ==> Command "Select FROMSCRIPT DESELECTNOMATCH" succesfully executed
 03-May-25 10:04:PM LogicRun:  INFO    => === COMMAND END ===

The Everything result is good. All three appear:

...

But left clicking on this file (left clicking the button while that file is selected)
Need One File Files

results in trouble.

The log for when that happens:

 03-May-25 10:07:PM LogicRun:  INFO    => === COMMAND BEGIN ===
 03-May-25 10:07:PM LogicRun:  DEBUG   => cmdline              : LogicRun IN "C:\Users\hi\Pictures\hi there\Forums\Test Folder\" GETPROPS USEEVERYTHING size:$(sizeautoEV)$
 03-May-25 10:07:PM LogicRun:  DEBUG   => COMMANDS             : true
 03-May-25 10:07:PM LogicRun:  DEBUG   => USEEVERYTHING        : size:$(sizeautoEV)$
 03-May-25 10:07:PM LogicRun:  DEBUG   => FILTER               : false
 03-May-25 10:07:PM LogicRun:  DEBUG   => FILTERDEF            : false
 03-May-25 10:07:PM LogicRun:  INFO    => Expanding filter...
 03-May-25 10:07:PM LogicRun:  DEBUG   =>  => Getting values for "sizeautoEV" for 1 items...
 03-May-25 10:07:PM LogicRun:  INFO    => Getting files using Everything...
 03-May-25 10:07:PM LogicRun:  DEBUG   => ==> EV is running:true; autorun:false
 03-May-25 10:07:PM LogicRun:  DEBUG   => ==> Waiting for EV database to be loaded: 1
 03-May-25 10:07:PM LogicRun:  DEBUG   => => file : C:\Users\hi\Pictures\hi there\Forums\Test Folder\
 03-May-25 10:07:PM LogicRun:  DEBUG   => QUERY                : !path:"$Recycle.Bin"  <C:\Users\hi\Pictures\hi there\Forums\Test Folder\> size:10.6KB
 03-May-25 10:07:PM LogicRun:  DEBUG   => ==> Query finished. Results=0
 03-May-25 10:07:PM LogicRun:  INFO    => ITEMS TO FILTER      : 0
 03-May-25 10:07:PM LogicRun:  WARNING => You need at least one file for using this command!
 03-May-25 10:07:PM LogicRun:  INFO    => === COMMAND END ===

Everything result is none:

Same happened when this folder was selected:
Same Folder Error

Using it with folders doesn't work at all.

Left click or Ctrl + click. The same error happens. The log is probably the same; I'll post it if you want. I'm screwing with my user folder paths because with AI scraping the whole web I can't trust a damn thing anymore.

Can you find the trouble file in Everything and show me the size column value?

Ah yes, it's 0.1kb different than in Dopus.

The problem folder is also 0.1MB different than Dopus.

The VoidTools dev reply did mention I can choose the number of digits for sizes. Not sure if that's involved here.

Mmm I'd never really considered before that the two might round out the size differently.
It might be interesting to ask him (void) why there's such a difference.
If you want to find results by the exact number of bytes, you can replace sizeautoEV with size. Since we usually handle size with units for practicality, that's why it was my first choice.
Additionally, you can use a similar Opus filter instead of EV.

Could be that ceiling / floor option, or the number of digits. 2.64 will round down to 2.6 but 2.6 will round up to 3.
I could just not use Everything for this script, that would be fine.

Probably not, since you might end up with different values than the ones showing up correctly now.
I think you’ve got two options:

  • Use Opus filtering.
  • Use Everything and filter by size but in bytes.

Ok, I'll just not use Everything. Do I just get rid of the 'USEEVERYTHING' in my button?
I tried that on this new version and it broke it.