WAD Incorrect results from @FILESIZE

Jan 19, 2011
604
14
Norman, OK
Since TCC/LE is provided as is without support, I thought I'd cross-post it here since the error also exists in full version of TCC. Here's a link to the post in the TCC/LE forum instead of creating additional entries.
 
Aug 2, 2011
258
4
Berlin, Germany
Thank you, good idea.
I can confirm the behavior with tcc (from my pc via server-share):
Code:
>echo %@filesize[/s /[d2000-01-01,2010-12-31] \\app-server3\Anlagen\fl51\*.*,M]
626
 
>echo %@filesize[/s /[d2000-01-01,2010-12-31] \\app-server3\Anlagen\fl51\bildverarbeitung\*.*,M]
3560
 
>ver /r
 
TCC  13.04.58 x64  Windows 7 [Version 6.1.7601]
TCC Build 58  Windows 7 Build 7601  Service Pack 1
Registered to **********
 

rconn

Administrator
Staff member
May 14, 2008
12,367
150
Not a bug. The range arguments are being applied to the directories as well as the files, so the /S isn't traversing directories that don't match the date range.

This has always been a unsettled issue -- some users want directories included in ranges, and other users don't.
 
Aug 2, 2011
258
4
Berlin, Germany
Not a bug. The range arguments are being applied to the directories as well as the files, so the /S isn't traversing directories that don't match the date range.

This has always been a unsettled issue -- some users want directories included in ranges, and other users don't.
Ok, so it is WAD.
But shouldn't this become settled?
Perhaps by letting the user choose whether to recurse all directories respectively appy the range only to files?
In fact I have very huge directories and want to give my users a kind of fileage-assessment.
 
May 20, 2008
3,515
4
Elkridge, MD, USA
Since moving an old file into a directory modifies the directory, it "w" timestamp is changed. 99.9% of my accesses do not care what the directory dates are, only files. The complimentary issue is even worse - let directory A and its subdirectory B be older than the date range of interest, but let B's subdirectory C contain a file in the selected range. It will not be reported!

Since the issue is raised relating to @FILESIZE, not @DIRECTORYSIZE, I would like to see the DESIGN changed - when a request is made for members of a directory hierarchy within a specific date range, ALL matching members should be included, even if there is a directory level in the path to the matching member which does not match. I would compare this to trying to locate all 25-year old soldiers in a batallion, and the report ignoring the 25-year olds in units whose commander is older or younger.
 

Charles Dye

Super Moderator
Staff member
May 20, 2008
4,469
88
Albuquerque, NM
prospero.unm.edu
@FILES & @FILESIZE - Changed the /S behavior to not apply ranges to directories. (Now we'll see who complains more -- the people who want directory ranges or the people who don't!)

I can see wanting ranges applied when the subdirectories are the things being listed or acted on (/A:D), but I can't imagine ever wanting them applied to subdirectories for recursion (/S)!
 
May 20, 2008
3,515
4
Elkridge, MD, USA
I use this thread relating to the release of 13.04.62. Is this change of behavior applicable to ALL commands which use both a date range and /S, so the "copy /s /[d] xxx\ yyy\" command will copy all files from the xxx hierarchy that are today's, even if some directory in the path between xxx\ and the file has NOT been modified today, e.g., if the only new file in the tree is "xxx\yyy\zzz\aaa\today.txt", today.txt will be copied?
 
Aug 2, 2011
258
4
Berlin, Germany
I can see wanting ranges applied when the subdirectories are the things being listed or acted on (/A:D), but I can't imagine ever wanting them applied to subdirectories for recursion (/S)!
Because English isn't my first language, I had to read your statement more than 1 time ;)
So you agree to the way Rex designed it currently, right?

btw:
Now it is working perfectly for me (at least).
I can identify how many old files are wasting how much space.
 

Charles Dye

Super Moderator
Staff member
May 20, 2008
4,469
88
Albuquerque, NM
prospero.unm.edu
Because English isn't my first language, I had to read your statement more than 1 time ;)

Don't take it personally. My sentences are frequently convoluted enough to give native English speakers pause. (And the forum's helpful conversion of TCC syntax into a smiley doesn't help matters.)

So you agree to the way Rex designed it currently, right?

I have not actually tested that version. But if I understand correctly, the new behavior makes much more sense to my little brain.
 
Similar threads
Thread starter Title Forum Replies Date
Steve Pitts WAD @MD5 returns incorrect results for strings Support 2
Charles Dye REGDIR /T : incorrect localization of time stamps Support 4
S incorrect message at start Cancel batch job 4START.bat ? (Y/N/A) : Support 1
rps Fixed @filesize[...,a] space allocated values incorrect Support 2
M TCC incorrect dir output since Windows 1803 Support 6
Fross @Words Incorrect? Support 19
Phil Kane WAD v 17 Displays Incorrect OS Support 6
rps Documentation "Select" command switch order incorrect Support 4
R Fixed Bytes Allocated Total Incorrect in V17 b52 Support 1
M Incorrect ARGV1 when using linux-style paths Support 4
D Minor problem. Incorrect value internal var _dir_files Support 7
S WAD Incorrect _do_loop values Support 18
The Wizard WAD Possible Incorrect COMSPEC handling Support 2
Dan Glynhampton Documentation v15 help: Incorrect Links Support 0
T @ping: response code, data size and documentation incorrect Support 2
N Incorrect display under TCMD 13 Support 1
dcantor @AGEDATE example incorrect in help Support 0
T Incorrect file associations Support 8
C TC10 LIST - print with line nbrs incorrect Support 0
D D:\Settings\Application contains an incorrect path? Support 0
F strange results Support 9
vefatica @FILESIZE[] ... allocated ... unexpected results Support 0
Joe Caverly DrawVLine results different in TCMD tab and detached TCC Support 11
W pdir returns diff results between tcc and tcmd - one is an error msg Support 5
rps @FILESIZE[....,a] allocated size not matching Dir results Support 8
thorntonpg @eval function, interesting results any explanation? Support 3
J WAD utf8decode string only results in ? chars Support 2
rps How to? dir /s unexpected results Support 10
T Associating BTM files with IDE results in DOS box Support 33
M Why does this code produce these results? Support 2
M Why is this function getting these results in these circumstances? Support 6
S Trouble accessing results of forum search Support 2
beerns different results between tcmd and cmd Support 2
M Unexpected Results from Doing Numeric Comparisons... Support 17
daniel347x Different results with TCC than with cmd.exe Support 2
vefatica @SERVICE, unexpected results Support 6
vefatica Strange results with CP 1252 Support 12
dcantor LIST /X and TYPE /X give different results Support 20
T Concatenate echoed text with the results of a grep command? Support 2
Joe Caverly @FILESIZE and NTFS File Stream Support 1
vefatica @FILESIZE ... allocated space Support 7
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
H @filesize result for directory? Support 2
dcantor Build 56 @FILESIZE problem Support 2

Similar threads