1.2.
set "filemask=myfile*.txt" for %%A in (%filemask%) do if %%~zA==0 echo."%%A" is empty
"myfile2.txt" is empty "myfile7.txt" is empty "myfile8.txt" is empty