Fixed DIR /G returns wrong sizes

Jan 12, 2016
1
0
allocated size is shown correctly only for the first file
further files show size (NOT allocated size)

dir /mk *.!ut
02/09/2016 17:25 319,113,722 sln-fg.1301.mkv.!ut
02/09/2016 17:25 104,195,710 sln-fg.1302.mkv.!ut
02/09/2016 17:25 91,046,040 sln-fg.1303.mkv.!ut
02/09/2016 17:25 96,434,150 sln-fg.1304.mkv.!ut
02/09/2016 17:25 113,042,451 sln-fg.1305.mkv.!ut

dir /gmk *.!ut
02/09/2016 17:25 199,884,800 sln-fg.1301.mkv.!ut
02/09/2016 17:25 104,198,144 sln-fg.1302.mkv.!ut
02/09/2016 17:25 91,049,984 sln-fg.1303.mkv.!ut
02/09/2016 17:25 96,436,224 sln-fg.1304.mkv.!ut
02/09/2016 17:25 113,045,504 sln-fg.1305.mkv.!ut
only the first is correct (compare ALLOCATED below and SIZE above)


for %x in (*.!ut) dir /gmk %x
02/09/2016 17:25 199,884,800 sln-fg.1301.mkv.!ut
02/09/2016 17:25 66,912,256 sln-fg.1302.mkv.!ut
02/09/2016 17:25 60,882,944 sln-fg.1303.mkv.!ut
02/09/2016 17:25 61,145,088 sln-fg.1304.mkv.!ut
02/09/2016 17:25 72,876,032 sln-fg.1305.mkv.!ut


bug exists in TCC 20.0.16
this bug existed since v18 at least, maybe even 17 or 16 if memory serves
in the old 4NT this worked fine
 
May 20, 2008
11,432
99
Syracuse, NY, USA
I can reproduce that. In this directory, all files are compressed. As hundreAd said, in the second command below, only the first is treated as compressed.

Code:
c:\windows\logs\systemrestore> dir /m /k
2016-09-03  00:56         <DIR>    .
2016-09-03  00:56         <DIR>    ..
2014-01-07  23:22         327,680  RestoreUI.0.etl
2014-01-07  22:12         196,608  RestoreUI.1.etl
2013-12-16  00:27         196,608  RestoreUI.2.etl
2013-07-21  00:44         131,072  RestoreUI.3.etl
2012-10-24  01:46         131,072  RestoreUI.4.etl

c:\windows\logs\systemrestore> dir /m /k /g
2016-09-03  00:56         <DIR>    .
2016-09-03  00:56         <DIR>    ..
2014-01-07  23:22          20,480  RestoreUI.0.etl
2014-01-07  22:12         196,608  RestoreUI.1.etl
2013-12-16  00:27         196,608  RestoreUI.2.etl
2013-07-21  00:44         131,072  RestoreUI.3.etl
2012-10-24  01:46         131,072  RestoreUI.4.etl

c:\windows\logs\systemrestore> do x in * ( dir /m /k /g %x )
2014-01-07  23:22          20,480  RestoreUI.0.etl
2014-01-07  22:12          12,288  RestoreUI.1.etl
2013-12-16  00:27          12,288  RestoreUI.2.etl
2013-07-21  00:44           8,192  RestoreUI.3.etl
2012-10-24  01:46           8,192  RestoreUI.4.etl
 
Similar threads
Thread starter Title Forum Replies Date
E Fixed Bug with DIR /Z displaying descriptions Support 8
J Paths shown in DIR /B Support 2
K Fixed Prompt display will be shifted after use dir to display a filename with Chinese. (v25.00.28 x64) Support 18
Jesse Heines How to? How to display picture creation date with dir command Support 6
vefatica WAD DIR.BTM? Support 11
DrusTheAxe DIR reports meaningless SYMLINK information Support 14
C show file description? with dir? Support 8
vefatica DIR /F and streams? Support 7
rps Multi-column DIR /v not displaying all files. Support 5
R How to? Dir specific file search patterns with spaces in the pathnames? Support 6
rps Dir /Nfv -> Alt-F2 Support 2
rps @FILESIZE[....,a] allocated size not matching Dir results Support 8
A TCMD - Dir Command puts out blank lines? Support 16
S Problems with dir command in the debugger Support 5
M TCC incorrect dir output since Windows 1803 Support 6
x13 Problem listing repository files using DIR http(s)://... Support 8
cxxl dir /s works in mysterious ways :( Support 4
vefatica Help nit (FFIND and DIR with /S) Support 0
N Fixed Strange dir behavior Support 6
JohnQSmith Weird DIR output (missing lines) Support 1
C 7zip with date range .vs. filelist created with dir and daterange Support 0
D Towards shared (dir-)history lists Support 3
vefatica WAD DIR /HL still gets names wrong Support 16
vefatica DIR /S /HL? Support 4
nickles WAD dir.htm Support 2
vefatica DO dir in /s /a:+d /d"g:\" * ( ... ) Support 26
vefatica DIR \\.\...? Support 4
M Fixed DIR /S /B1 ignores "/S" Support 5
C tcmd.ini not loading from program dir? Support 5
D Fixed Dir /Nm:n has changed Support 1
rps How to? dir /s unexpected results Support 10
vefatica Update to current install dir? Support 8
cgunhouse Problem with "dir /=" Support 4
T dir /h error in empty directory Support 22
P WAD TC 15.0.1.58 x64 crasches with a simple dir command Support 18
CWBillow dir /4 strange Support 2
samintz WAD DIR /B1 and /X Support 2
nickles dir behaves inconsistently Support 5
vefatica DIR, streams, and wildcards? Support 1
vefatica DIR /: /u ... streams not counted? Support 7
vefatica Documentation DIR /B /S /: Support 2
samintz How to? DIR listing for exact match Support 1
dcantor WAD dir "ftp:// ..." fails in TCC 15 Support 7
T How to? dir/pdir - 2nd level down only Support 7
MikeBaas How to? DIR: supress extensions? Support 5
old coot dir /s dies on my C: drive Support 2
A WAD Dir daterange + multiple path wildcards crashes tcc Support 2
old coot TC DIR command has trouble on my SSD Support 2
M Fixed character set in dir/copy Support 3
C odd behavior of "dir" Support 0

Similar threads