I've started with this script for use on a Windows 98 machine.
It does what I need it to do for a specific file but I need to have this same function results with the size of the folder and it's sub-folders combined. I'm sure coding is completely different for a folder than a file but I need help.
@echo off
setlocal
set file="test.cmd"
set maxbytesize=16305780
FOR /F "usebackq" %%A IN ('%file%') DO set size=%%~zA
if %size% EQU %maxbytesize% (
echo.Folder is the right size - PASS
) ELSE (
echo.Folder is wrong size - FAIL
)