Test for zero byte file using a DOS batch file - TechRepublic
Question
February 25, 2009 at 10:34 AM
jutpro

Test for zero byte file using a DOS batch file

by jutpro . Updated 17 years, 3 months ago

Does anyone know of any DOS commands that checks or test if a file is empty (0 byte)? Is this even possible? I have been searching the internet and I see where others have asked the same question but never received a response.
I would like to test if certain files in a directory are zero bytes in size and if so skip or delete that file.

For example;
If first file is > 0 byte then go to next file
etc

Any help on this will be most appreciated.
Thanks.

This discussion is locked

All Comments