@FileSize - How is this possible?

May 24, 2010
855
0
Northlake, Il
As usual a quick screen shot:
Code:
[Z:\]echo %@Comma[%@Eval[%@FileSize[C:\,b,a]-%@FileSize[C:\,b]]]
-4,294,936,837
The question should be obvious: How can the allocated size be less than the file size? What am I missing?
 
Last edited:
May 24, 2010
855
0
Northlake, Il
Beg to differ, Rex. Behold:
Code:
[C:\]echo %@Comma[%@FIleSize[C:\,b,a]]
5,011,992,576

[C:\]echo %@Comma[%@FIleSize[C:\*,b,a]]
5,011,992,576

[C:\]echo %@Comma[%@FIleSize[C:\,b]]
9,306,929,413

[C:\]echo %@Comma[%@FIleSize[C:\*,b]]
9,306,929,413
Need I say more?

If it makes any difference I am running TCC 16.03.55 x64 Windows 7 [Version 6.1.7601].
 
May 20, 2008
11,400
99
Syracuse, NY, USA
You're not providing a file name, you're entering a directory name (which will return "-1" because it's not a file).
The '*' seems to be implied.
Code:
v:\> echo %@Comma[%@Eval[%@FileSize[C:\*,b,a]-%@FileSize[C:\*,b]]]
8,158

v:\> echo %@Comma[%@Eval[%@FileSize[C:\,b,a]-%@FileSize[C:\,b]]]
8,158

v:\> *dir /k /a:-d c:\
2009-06-10  17:42  24  autoexec.bat
2009-06-10  17:42  10  config.sys
2012-03-09  14:32  0  IO.SYS
2012-03-09  14:32  0  MSDOS.SYS
2014-06-26  14:43  1,073,741,824  pagefile.sys
  1,073,741,858 bytes in 5 files and 0 dirs  1,073,750,016 bytes allocated
  4,436,877,312 bytes free
 
May 24, 2010
855
0
Northlake, Il
Here it be:
Code:
[Z:\]Echo %@FileSize[C:\,b,a]^r^n%@FileSize[C:\,b] & *dir C:\
5011992576
9306929413

 Volume in drive C is Everything  Serial number is 420a:1d5b
 Directory of  C:\*

 8/11/2014  22:23  <DIR>  D
 7/18/2014  18:40  <DIR>  Desktop Icons
 7/18/2014  18:49  <SYMLINKD>  Documents and Settings [C:\Users]
 8/13/2014  7:20  <DIR>  E
 4/17/2012  23:11  <DIR>  EFI
 7/18/2014  23:30  <DIR>  F
 7/13/2009  22:20  <DIR>  PerfLogs
 8/08/2014  15:55  <DIR>  Program Files
 8/11/2014  22:34  <DIR>  Program Files (x86)
 8/11/2014  22:15  <DIR>  Q
 7/22/2014  18:46  <DIR>  RamSave
 7/22/2014  18:46  <DIR>  RamSaveII
 8/13/2014  7:22  <DIR>  Recover
 8/11/2014  22:32  <DIR>  swsetup
 7/23/2014  23:37  <DIR>  temp
 7/22/2014  23:58  <DIR>  Unneeded Shortcuts
 7/18/2014  18:58  <DIR>  Users
 8/12/2014  15:31  <DIR>  Windows
 7/20/2014  15:58  49,457,945  All Things Considered.V2014-07-19.mp3
 7/20/2014  18:14  49,457,945  All Things Considered.V2014-07-19B.mp3
 7/20/2014  18:10  47,331,786  All Things Considered.V2014-07-20.mp3
 7/24/2014  0:19  364,040  BackupProduct.exe
 7/24/2014  0:19  77,320  BackupProductRes.dll
 7/24/2014  0:19  2,706,952  BonesResource.dll
 7/24/2014  0:19  1,461,768  DNABones.dll
 7/24/2014  0:19  438,280  DNABonesProxy.dll
 7/21/2014  15:36  1,444  Drive Cleanup Statistics.V2014-07-21.txt
 7/21/2014  15:34  796  RAM Disk Get Transaction ID letter.txt
 7/19/2014  16:32  94  RAMDisk Image Sizes.txt
 8/12/2014  23:37  251,665,968  RAMDisk.img
 8/08/2014  1:18  251,665,968  RAMDisk.img.bak
 7/22/2014  1:32  8,212  Restoration_Profile.png
 7/20/2014  18:12  37  Take Command Registration Key.txt
  654,638,555 bytes in 15 files and 18 dirs  654,667,776 bytes allocated
  107,796,791,296 bytes free
Note again that the allocated size is less than the size.
 
May 24, 2010
855
0
Northlake, Il
A quick Google search told me how to find out (of course) and the answer is no. See attached screen shot.
C-Drive Attributes.png
 
May 24, 2010
855
0
Northlake, Il
That is the answer, Rex. The RAM disk software I am using evidently compresses its on-disk image(s). Look at the RAMDisk.img files at the bottom of the below (I can't highlight them in a code block).
Code:
Volume in drive C is Everything  Serial number is 420a:1d5b
Directory of  C:\*

8/11/2014  22:23  <DIR>  0%  D
7/18/2014  18:40  <DIR>  0%  Desktop Icons
7/18/2014  18:49  <SYMLINKD>  0%  Documents and Settings [C:\Users]
8/13/2014  7:20  <DIR>  0%  E
...
8/12/2014  23:37  251,665,968  64%  RAMDisk.img
8/08/2014  1:18  251,665,968  64%  RAMDisk.img.bak
7/22/2014  1:32  8,212  0%  Restoration_Profile.png
...
 
Similar threads
Thread starter Title Forum Replies Date
Joe Caverly @FILESIZE and NTFS File Stream Support 1
vefatica @FILESIZE[] ... allocated ... unexpected results Support 0
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
M @Files and @FileSize failures... Support 2
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
Jay Sage WAD Possible Bug With OPTION Command With @FILE Support 5
M Is bash-like filename completion possible? Support 3
vefatica DO /P ... is this possible ... ? Support 5
I Possible Bug: History /n Returns Nothing Support 3
Jay Sage WAD Possible Bug in Batch Parameters Support 7
S Is restartable TCMD download possible? Support 6
H Possible V16 documentation error? Support 2
The Wizard WAD Possible Incorrect COMSPEC handling Support 2
S How to? Is it possible for the IDE to start without plugins? Support 3
A How to? Is it possible to freeze one side of the console? Support 19
Vasilich How to? debugging files that use CALL command - possible?? Support 3
wbiebel Can this be possible: TCEXIT is not executed? Support 21
Frank VIEWing multiple files possible? Support 4
daniel347x Is it possible to send a line from the "command input" window to the tab without pressing "Enter", w Support 4
C Possible caching problem with http files Support 7
S Dir - case selection possible?? Support 3
T Possible to delete the new standard tab? Support 1
noahcoad Possible Bug? Launching 4nt.exe Goes Hairwire Support 10
G possible bug in SETDOS Support 4
M Something that does not seem possible... Support 2
D Is this possible, and how Support 0

Similar threads