# BATCH HOW TO CHECK IF FOLDER IS EMPTY
for /F %%i in ('dir /b /a "folderpath*"') do (
echo if you see this the folder is NOT empty
)
@echo off
color 02
setlocal
set _folder="C:Demo"
for /F %%A in ('dir /b /a %_folder%') Do (
Echo The folder is NOT empty
pause
goto exit
)
echo The folder is empty
pause
goto exit
:exit
exit