Here is an example of a batch file that does this. You call it the name of the file you want to check, empty or not:
@ECHO OFF
IF "%~z1"=="0" GOTO FileEmpty
ECHO File is not empty
GOTO End
:FileEmpty
ECHO File is empty
:End
Note that the file must exist for this to work. But you can easily check this withIF EXIST
Pablo source
share