@FILESIZE[] ... allocated ... unexpected results

May 20, 2008
Syracuse, NY, USA
@FILESIZE[] doesn't get the allocated size right for files larger than 2^32-1. I'd guess it's not using 64-bit numbers (or not using them correctly). Below, the file size is 2^32+1 bytes.

v:\new> dir /k /m /h
2020-02-14  15:12       6,700,417  big.rnd
2020-02-14  15:15   4,294,967,297  bigger.rnd

v:\new> echo %@filesize[bigger.rnd,b,a]
Similar threads
Thread starter Title Forum Replies Date
rps @FILESIZE[....,a] allocated size not matching Dir results Support 8
rps Fixed @filesize[...,a] space allocated values incorrect Support 2
vefatica @FILESIZE ... allocated space Support 7
Joe Caverly @FILESIZE and NTFS File Stream Support 1
M @Files and @FileSize failures... Support 2
M @FileSize - How is this possible? Support 10
M @Files, @FileSize returning nothing... Support 7
M A (minor) limitation of @FileSize... Support 6
JohnQSmith WAD Incorrect results from @FILESIZE Support 9
H @filesize result for directory? Support 2
dcantor Build 56 @FILESIZE problem Support 2
R Fixed Bytes Allocated Total Incorrect in V17 b52 Support 1
M How to? Find out the total allocated size of a directory tree... Support 7
sully9 How to? Unexpected %DATE% CMD variable format (vs DATE /T format) in CMDebug Support 1
T WAD Strange Unexpected "features" in the Debugger Support 2
Mike Hall Unexpected "Variable loop" in IF condition Support 10
rps How to? dir /s unexpected results Support 10
R Unexpected 'Cancel Batch Job' prompts Support 13
A How to? PhraseExpress autotext/autocompletion printing unexpected characters Support 4
S Unexpected error report Support 7
D Unexpected behavior Support 8
H TPIPE: /FILTER and /OUTPUT unexpected incompatibility Support 6
M How to? Work around an unexpected and very inconvenient behavior of TCC... Support 26
M Unexpected Results from Doing Numeric Comparisons... Support 17
F unexpected %1 while starting ide Support 6
vefatica @SERVICE, unexpected results Support 6
Emilio III Unexpected file deletion Support 30
S RECYCLE /P - unexpected behavior Support 0
I on error[msg] unexpected behaviour Support 0

Similar threads