Need to check file size through batch script.
Moderator: DosItHelp
Need to check file size through batch script.
Need to check the size of the file and if file size is '0' bytes then do things
Re: Need to check file size through batch script.
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
)