Need to check file size through batch script.
Posted: 04 Jul 2013 23:43
Need to check the size of the file and if file size is '0' bytes then do things
A Forum all about DOS Batch
https://www.dostips.com/forum/
Code: Select all
@echo off
if exist "filename" (
for %%F in ("filename") do set "file_size=%%~zF"
)
if defined file_size if %file_size%0 NEQ 00 (
do something
) else (
do something else
)