Everything+Totalcommander displays wrong folder size

Found a bug in "Everything"? report it here
Post Reply
att
Posts: 6
Joined: Mon Oct 12, 2009 12:03 pm

Everything+Totalcommander displays wrong folder size

Post by att »

Hello,
I often use "Everything" with Total Commander. I have a reproducible bug that displays the size of one folder wrong when using Totalcommander with the "Everything"-option. The bug is 100% reproducible as follows:

1.) You download a lot of folders and files in one primary download folder for example, z:\downloads\jd2
2.) You generate a new folder somewhere else, where you want to store all these downloads incl. subfolders on the same drive, for example z:\newdownloads\2022_12\01
3.) using Totalcommander, you move all freshly downloaded files/folders from z:\downloads\jd2 to z:\newdownloads\2022_12\01
4.) Using Totalcommander, you press Left-Alt + Right-Shift + Return : Totalcommander will display the size of the directory ( z:\newdownloads\2022_12\01 in this example).

5.) You REPEAT step 4.) i.e. you repeatedly press Left-Alt + Right-Shift + Return _serveral times_ and to your surprise, after the 4th or 5th or 6th time, the "size of the directory" value (displayed in red color in TC) changes, namely, from the initially correct value to a value that is substantially lower. This only happens when the download size was greater than about 7 GB or something like this. It does not happen if you have downloaded too few and too tiny amount or size of files.

6.) No matter how often you repeat pressing Alt+Shift+Return in TC, the wrong size value stays. Your only option is to exit TC, and tell "Everything" to re-create the database. After which, the bug disappears for a while, or atleast until you keep downloading new stuff.

It would be great if that bug can be fixed, it's somehow annoying.
horst.epp
Posts: 1345
Joined: Fri Apr 04, 2014 3:24 pm

Re: Everything+Totalcommander displays wrong folder size

Post by horst.epp »

I guess you mean Alt-Shift-Enter in TC to count the size of all dirs in the current dir.
I don't even need this as TC always updates the size of all sub-dirs it shows
if configured to use Everything for this (Automatic only with Everything).

You didn't provide any usefull information about your Environment :(
TC version ?
Everything version ?

In my system I couldn't reproduce your problem.
______________________________________________________
Windows 11 Home x64 Version 22H2 (OS Build 22621.900)
Everything 1.5.0.1330a (x64)
TC 10.52 x64 / x86
att
Posts: 6
Joined: Mon Oct 12, 2009 12:03 pm

Re: Everything+Totalcommander displays wrong folder size

Post by att »

Yes I mean Alt Shift Enter.
Environment: Windows 7 Enterprise, Q6600 CPU, MSI Neo3-FR Rev1 mobo, 8 GB RAM, 5 drives, ~ 2.1 Million files.
Latest Version of "Everything" i.e. Version 1.4.1.1022 (x64).
All versions of TC are affected, from 8.51 to 10.51rc1 (which I use) to 10.52.
void
Developer
Posts: 15352
Joined: Fri Oct 16, 2009 11:31 pm

Re: Everything+Totalcommander displays wrong folder size

Post by void »

Thank you for the bug report att,

Does the Everything GUI report the incorrect folder size too?

In Everything, if you search for:
exact:z:\downloads\jd2
-or-
exact:z:\newdownloads\2022_12\01

Is the folder size shown correctly in Everything?



Is Everything missing files/folders?
In Everything, if you search for:
z:\downloads\jd2\
-or-
z:\newdownloads\2022_12\01\

Are there files/folders missing from your index?



What type of indexing are you using?
Is Z: added as a folder index under Tools -> Options -> Folders?
Is Z: added as a NTFS index under Tools -> Options -> NTFS?
-There might be an issue with Everything not seeing the folder changes for folder indexes.
-Sizes in Everything for NTFS files are only updated when all file handles are closed.



Are you excluding any files/folders?
Are you excluding hidden/system files/folders under Tools -> Options -> Exclude?
-Everything may not track sizes correctly if the file/folder was ever excluded.
tuska
Posts: 933
Joined: Thu Jul 13, 2017 9:14 am

Re: Everything+Totalcommander displays wrong folder size

Post by tuska »

att wrote: Sun Dec 04, 2022 9:59 pm Yes I mean Alt Shift Enter.
...
Latest Version of "Everything" i.e. Version 1.4.1.1022 (x64).
All versions of TC are affected, from 8.51 to 10.51rc1 (which I use) to 10.52.
Total Commander - HISTORY.TXT wrote: 28.08.17 Release Total Commander 9.10 beta 1 pre 1 (private beta) (32/64)
23.08.17 Added: Configuration - Options - Operation: Option to use "Everything" to get directory sizes
                         via Alt+Shift+Enter and/or spacebar. Needs recent Everything version with folder size index enabled (32/64)
att
Posts: 6
Joined: Mon Oct 12, 2009 12:03 pm

Re: Everything+Totalcommander displays wrong folder size

Post by att »

Yeah, sorry I did not remember the exact version number in TC. I was typing this from my head.

I don't have any hidden files, and I am not excluding them.
No files/folders are missing. All files are closed and have been properly downloaded.
No files/folders are excluded.
Almost all options used in "Everything" are standard options.
All drives are NTFS indexes. No "folder" is an index.
void
Developer
Posts: 15352
Joined: Fri Oct 16, 2009 11:31 pm

Re: Everything+Totalcommander displays wrong folder size

Post by void »

Thank you for the information att,

Please try reproducing the issue.
The next time you see the wrong size could you please check:

Does the Everything GUI report the incorrect folder size too?
In Everything, if you search for:
exact:z:\downloads\jd2
-or-
exact:z:\newdownloads\2022_12\01
Please check the folder sizes against Windows Explorer's properties.
-This will help to determine if the issue is with the Everything index or IPC.



Are there any missing files/folders in Everything when you search for:
z:\downloads\jd2\
-or-
z:\newdownloads\2022_12\01\
-This will help to determine if the issue is with the Everything index missing files.
tuska
Posts: 933
Joined: Thu Jul 13, 2017 9:14 am

Re: Everything+Totalcommander displays wrong folder size

Post by tuska »

2att
Just because it hasn't been mentioned yet - are these options checked in Everything 1.4.1.1022 (x64) under
Tools > Options... > Indexes:
- Index file size
- Index folder size
?
att
Posts: 6
Joined: Mon Oct 12, 2009 12:03 pm

Re: Everything+Totalcommander displays wrong folder size

Post by att »

Yes, file and folder size are indexed. In fact, I selected all options on for indexing.
I just downloaded something, but it was too small, 4.0 GB, I guess the bug is triggered by some 2^32 i.e. > 4.294... GB stuff.
You can also try it yourself, it is 100% reproductible.
tuska
Posts: 933
Joined: Thu Jul 13, 2017 9:14 am

Re: Everything+Totalcommander displays wrong folder size

Post by tuska »

att wrote: Wed Dec 07, 2022 8:54 am ...
I just downloaded something, but it was too small, 4.0 GB, I guess the bug is triggered by some 2^32 i.e. > 4.294... GB stuff.
You can also try it yourself, it is 100% reproductible.
I am already working with Everything 1.5.0.1330a (x64), 1.5.0.1331a (x64) up from 8.12.2022 and
Windows 11 Pro (x64) Version 22H2 (OS Build 22621.900) and therefore can NOT reproduce your TEST SCENARIO
in Everything 1.4.1.1022 (x64) and Total Commander 10.52.

However, a SHORT CHECK has given me the following results under these conditions:

Total Commander 10.52 (x64)
- Show hidden and system files (as Everything counts these folders and files by default)
- Ignore list (cm_SwitchIgnoreList) switched OFF
- 4 folders compared with these sizes: 219 GB, 37 GB, 11.8 GB, 7.56 GB
  - CTRL+L Calculate occupied space (of the selected files)
- ☑ 'Everything': Manual: Alt+Shift+Enter

Windows Explorer
Properties

Everything 1.5.0.1330a (x64)
- Tools > Options... > View > Size standard: JEDEC > Size format: Bytes
Footer
- Set Status bar - format (copy/paste the following code into your search box and press enter - wait a few seconds... watch the status bar)

Code: Select all

/statusbar_selection_format=Selected #if:<$selection-count:==$result-count:,all,#TEXT:$selection-count:,"#,###" of> #TEXT:$result-count:,"#,###" #ifs:<$folder-result-count:==0,files.,$file-result-count:==0,folders.,1,objects. (#if:<$file-selection-count:==$file-result-count:,all,#TEXT:$file-selection-count:,"#,###" of> #TEXT:$file-result-count:,"#,###" files#comma: #if:<$folder-selection-count:==$folder-result-count:,all,#TEXT:$folder-selection-count:,"#,###" of> #TEXT:$folder-result-count:,"#,###" folders.)> Size: #if:<$total-selection-size:!=$total-result-size:,#FORMATSIZE:$total-selection-size:,0 of >#FORMATSIZE:<$total-result-size:,0>.#if:<$total-result-size:<=1024, (#if:<$total-selection-size:!=$total-result-size:,#TEXT:$total-selection-size:,"#,###" of >#TEXT:$total-result-size:,"#,###" bytes.)>
- Search query - example:
  Find the folder size in bytes for the "OneDrive" folder (D:\Images\Private\OneDrive)
  Enter the following code in the Everything search box and DON'T press ENTER(!):

Code: Select all

folder: D:\Images\Private\ column1:=size:*1 add-column:column1
  Click on the "OneDrive" folder in the search result (highlight the folder).
  The column "Column 1" has been added on the right as the last column and in this column the folder sizes are displayed in bytes.
  Check the result in the status bar (Bytes, Gigabytes) ...

RESULT:
For the four folders, the number of bytes, files and folders matched between Windows Explorer
Everything ("Size" column in bytes; Footer: Size in Bytes and Gigabytes) and Total Commander!
att
Posts: 6
Joined: Mon Oct 12, 2009 12:03 pm

Re: Everything+Totalcommander displays wrong folder size

Post by att »

Very interesting result, thank you!

In the meantime, if I download and have also a window of "Everything" open, and do the
exact:z:\downloads\jd2 in "Everything",

and, if I then move the files to the destination folder, the bug also disappears. (?????)
void
Developer
Posts: 15352
Joined: Fri Oct 16, 2009 11:31 pm

Re: Everything+Totalcommander displays wrong folder size

Post by void »

I suspect you are using folder indexing to index your Z: drive.

Folder indexing does not detect the moving of folders correctly in Everything 1.4.
This is a limitation with ReadDirectoryChanges (the folder is seen as removed and new folder created, instead of "moved")

Everything 1.4 will see the moved folder as empty and thus the total size as 0.

The Z: drive will be rescanned daily so Everything 1.4 will eventually sync up.



This limitation is fixed in Everything 1.5.
If you would like to try this, I recommend disabling the Everything 1.5 instance when using with Total Commander:

Disable Everything 1.4 from running first:
  • In Everything 1.4, from the Tools menu, click Options.
  • Click the General tab on the left.
  • Uncheck Run on system startup.
  • Click OK.
  • Exit Everything 1.4 (File -> Exit)
Install Everything 1.5:
  • Install Everything 1.5.
  • Once Everything 1.5 is installed and running, exit Everything 1.5 (File -> Exit)
Disable the 1.5a instance so Total Commander can communicate with Everything 1.5a:
  • From the Start menu, search for: Notepad
  • Right click Notepad and click Run as administrator.
  • In Notepad, open your Everything-1.5a.ini in the same location as your Everything.exe
  • Change the following line:
    alpha_instance=1
    to:
    alpha_instance=0
  • Save changes and exit Notepad.
  • Restart Everything 1.5.
Setup Everything 1.5 to index your drives and Z: drive.

Uninstall Everything 1.4 if you are happy with the stability of Everything 1.5.



If you wish to keep using Everything 1.4, you will need to perform a rescan after moving a folder on your Z: drive:
  • In Everything 1.4, from the Tools menu, click Options.
  • Click the Folders tab on the left.
  • Select your Z: drive and click Rescan Now...
    ---please give Everything a few minutes to rescan your drive---
  • Click OK.
Post Reply