Checking If A File Is Zero Byte in Windows batch

@echo off
set FILE=%1
if not exist %FILE% goto :END
for /f "tokens=1-5" %%a in ('dir %FILE%') do call :CHECKFILE %%a %%b %%c %%d %%e
goto :END
if not {%5}=={%FILE%} goto :EOF
if {%4}=={0} ( echo It's a zero byte file! ) else ( echo It's not a zero byte file )
goto :EOF


Popular posts from this blog

How to recalibrate your Samsung Note 4 battery

How to import Tasker projects, profiles, tasks and scenes

How to turn your Windows 7 laptop or dekstop into a WiFi repeater or extender