Tools@BasicAware

CheckSize

Purpose

CheckSize determines if a file's size fits a comparison provided by parameters and returns an ERROR_LEVEL, which may be used and act upon in batch files.


Download

Command line application CheckSize


Installation

None. Download the ZIP file, extract the included executable and run it.

Please note: this is a console application. You should run it from a command prompt.


Use case(s)


Syntax

CheckSize /f=<file> /s=<size> /c=<compare argument>

Parameters:

Examples

CheckSize /f=c:\users\Me\ntuser.dat /s=1000000 /c=1

Determine if the size of the file c:\users\Me\ntuser.dat is greater than 1 million bytes.

CheckSize /f=c:\users\Me\Documents\MyDoc.txt /s=512mb /c=-2

Determine if the size of the file c:\users\Me\Documents\MyDoc.txt is lesser than or equal to 512 megabytes.


Source code

The PowerBASIC source code is available at Github


Known issues / limitations


Version

21.12.2024

Navigation

Tools

Info

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Germany License .
All contents copyright © 2012-2024 by BasicAware, Knuth Konrad