Range command dialog with blank maximum size erases everything

#1
If I do "erase /= *.*" and enter 1000 for the minimum size in the Ranges dialog, the command line is "erase /[s1000,0] *.*". This deletes everything that is at most 1000 bytes. I would think the command line should be "erase /[s1000] *.*".

TCC 22.00.40 x64 Windows 10 [Version 10.0.16299].
 

rconn

Administrator
Staff member
May 14, 2008
10,755
97
#4
The problem is entering only one argument. TCC could logically interpret that three ways:

1) Delete all files from 0 - 1000 bytes
2) Delete all files >= 1000 bytes
3) Delete all files exactly == 1000 bytes

I don't think that any one of those is obviously more sensible than the others, which is why I don't plan to change the existing behavior. (Which at least has the weight of history and all the existing batch files & aliases.)
 
#5
At least back to 4NTv8, the help has said (and still says):
The second parameter of a size range is optional. If you use a single parameter, you will select all files of the specified size or larger.
That doesn't leave much room for interpretation. And that's how it works.

I think the OP was only suggesting that you change the behavior of the "/=" dialog (which provides a second parameter even if it's not wanted) and not that you change the way size ranges work.
 
#6
Vince is correct. The second argument in a size range is optional and is the documented way to delete all files equal or greater than a certain size. The Help gives the example of "/[s1M] 2**20 bytes or larger". The problem is you can't enter this using the "/=" dialog. If you leave the second value blank in the dialog, it should not include the second value in the command line.