Bug or feature? File size does not refresh
Moderators: white, Hacker, petermad, Stefan2
Bug or feature? File size does not refresh
TC does not show actual file size just at the moment that file is being donloaded by browser or ffmpeg output.
Then I open the same folder with 7-zip (7zFM.exe) in background. Now TC shows actual increasing file size.
Then I close 7-zip. Now TC don't update file size any more, just until write process finishes.
I remember, that it worked for years before, but not now. Any ideas?
TC 11.02, Win10 21H2 x64
My config -- https://i.imgur.com/kPldr0N.png
Then I open the same folder with 7-zip (7zFM.exe) in background. Now TC shows actual increasing file size.
Then I close 7-zip. Now TC don't update file size any more, just until write process finishes.
I remember, that it worked for years before, but not now. Any ideas?
TC 11.02, Win10 21H2 x64
My config -- https://i.imgur.com/kPldr0N.png
Ukrainian Total Commander Translator. Feedback and discuss.
Re: Bug or feature? File size does not refresh
Tests a normal behavior while files are updated or downloaded.
Windows 11 Home x64 Version 23H2 (OS Build 22631.3593)
TC 11.03 x64 / x86
Everything 1.5.0.1376a (x64), Everything Toolbar 1.3.3, Listary Pro 6.3.0.78
QAP 11.6.3.3 x64
TC 11.03 x64 / x86
Everything 1.5.0.1376a (x64), Everything Toolbar 1.3.3, Listary Pro 6.3.0.78
QAP 11.6.3.3 x64
Re: Bug or feature? File size does not refresh
2Horst.Epp
Just try yt-dlp downloader or any ffmpeg conversion. TC inititally shows file size 0 until I open the same folder in 7zFM.exe or just press Alt+Enter on the file each time.
Just try yt-dlp downloader or any ffmpeg conversion. TC inititally shows file size 0 until I open the same folder in 7zFM.exe or just press Alt+Enter on the file each time.
Ukrainian Total Commander Translator. Feedback and discuss.
Re: Bug or feature? File size does not refresh
It’s strange that I remember exactly this behavior for a very long time and it seems like I always had to do it -
open the file in Lister without plugins in which the writing is being made and then make sure that its size has increased.
But I agree that having, like, settings to control the update of data in file panels, we are deprived of the opportunity
to see the growth in the size of such files without unnecessary manipulations...
open the file in Lister without plugins in which the writing is being made and then make sure that its size has increased.
But I agree that having, like, settings to control the update of data in file panels, we are deprived of the opportunity
to see the growth in the size of such files without unnecessary manipulations...
#146217 personal license
Re: Bug or feature? File size does not refresh
This is a (mis)feature of Windows Vista and higher. XP and older refreshed the file sizes upon directory refresh but newer versions of Windows do that only when a file is opened (and closed again) - which happens when pressing Alt+Enter on a file for example.
See also https://devblogs.microsoft.com/oldnewthing/20111226-00/?p=8813
Due to this annoying behavior I've written a little AutoIt script for myself:Then I created a new em_ command em_FileMetadataUpdate with parameter %P%N which is launched by pressing Ctrl+Shift+R. So whenever I need live and up-to-date file sizes I set the cursor on the file in question and press Ctrl+Shift+R (followed by the regular Ctrl+R).
Regards
Dalai
See also https://devblogs.microsoft.com/oldnewthing/20111226-00/?p=8813
Due to this annoying behavior I've written a little AutoIt script for myself:
Code: Select all
#NoTrayIcon
#include <WinAPI.au3>
if (NOT $CmdLine[0] >= 1) then Exit(1)
$FileName = $CmdLine[1]
$handle = _WinAPI_CreateFile($FileName, _
2, _ ; $iCreation (OPEN_EXISTING)
0, _ ; $iAccess (no access required)
7 _ ; $iShare (FILE_SHARE_READ or FILE_SHARE_WRITE or FILE_SHARE_DELETE)
)
if $handle <> 0 then
_WinAPI_CloseHandle($handle)
; MsgBox(0, "", StringFormat('File metadata for "%s" updated.', $FileName))
EndIf
Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
Re: Bug or feature? File size does not refresh
I don't know how, but 7zFM gets actual sizes. So, is there any solution to do the same in TC?
Ukrainian Total Commander Translator. Feedback and discuss.
Re: Bug or feature? File size does not refresh
Maybe 7zFM opens (all?) the files, thus circumventing this NTFS behavior on newer version of Windows.
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
Re: Bug or feature? File size does not refresh
Also I can confirm that only NTFS is affected. No problems with FAT32/exFAT there.
Ukrainian Total Commander Translator. Feedback and discuss.
Re: Bug or feature? File size does not refresh
It's simply as Dalai and I said
The same behavior is explained in Everything forum
and the Author really knows about the Windows file system.
The same behavior is explained in Everything forum
and the Author really knows about the Windows file system.
Windows 11 Home x64 Version 23H2 (OS Build 22631.3593)
TC 11.03 x64 / x86
Everything 1.5.0.1376a (x64), Everything Toolbar 1.3.3, Listary Pro 6.3.0.78
QAP 11.6.3.3 x64
TC 11.03 x64 / x86
Everything 1.5.0.1376a (x64), Everything Toolbar 1.3.3, Listary Pro 6.3.0.78
QAP 11.6.3.3 x64
Re: Bug or feature? File size does not refresh
I hope, there is any solution to fix that in TC.
Ukrainian Total Commander Translator. Feedback and discuss.
Re: Bug or feature? File size does not refresh
Check in other programs like CMD or Explorer or Explorer++ if they behave the same; they probably do. I'm also quite certain that it's not a bug in TC but a misfeature in Windows as I already mentioned above. I think all that could be done is to somehow circumvent this behavior - most likely at the cost of speed when refreshing.
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
Re: Bug or feature? File size does not refresh
I think, that it is not a "bug" in TC. WinRAR shows the same.
But it would be great if TC could do the same "magic" as 7zFM does.
But it would be great if TC could do the same "magic" as 7zFM does.
Ukrainian Total Commander Translator. Feedback and discuss.
- ghisler(Author)
- Site Admin
- Posts: 48138
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: Bug or feature? File size does not refresh
It's as Dalai explains, Windows no longer sends notifications when the size of a file changes, and just reading a directory does not report the new size. Only opening or closing the file causes a refresh. When I need to know the size during a longer download, I quickly press Alt+Enter and ESC.
Theoretically it would be possible to
1. Start a timer when a file is being created or opened
2. In the timer function, open and close that file to update its size
3. Display the updated size.
However, this has several disadvantages:
1. Opening the file can prevent other processes from opening it (sharing violation) with bad timing
2. This only works when in the same directory as the file when it's opened. Getting a list of already open files is tricky
3. It would cause extra system load, especially while downloading a lot of files
So for now I don't plan to add anything like this. I will move this thread to the suggestions forum for further discussion.
Theoretically it would be possible to
1. Start a timer when a file is being created or opened
2. In the timer function, open and close that file to update its size
3. Display the updated size.
However, this has several disadvantages:
1. Opening the file can prevent other processes from opening it (sharing violation) with bad timing
2. This only works when in the same directory as the file when it's opened. Getting a list of already open files is tricky
3. It would cause extra system load, especially while downloading a lot of files
So for now I don't plan to add anything like this. I will move this thread to the suggestions forum for further discussion.
Moderator message
Moved to suggestions
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Re: Bug or feature? File size does not refresh
May be there could be any simple workaround. Alt+Enter helps to update file size each time you do that, but it is does not autoupdate.
Ukrainian Total Commander Translator. Feedback and discuss.
Re: Bug or feature? File size does not refresh
If you need to have up-to-date file sizes (among other metadata) you can use the script I posted above. Compile it to an executable and integrate it into TC any way you like; I posted how I did it above. The same could be done in other programming or scripting languages - just opening and closing a file is enough to force Windows to update the metadata.
Such script could even be expanded to send a refresh command to TC (I've been too lazy to implement that in mine).
Regards
Dalai
Such script could even be expanded to send a refresh command to TC (I've been too lazy to implement that in mine).
Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror