Q. How can I enumerate all the zero-byte files in a folder tree?

I have scripted ZeroByte.bat to list the fully qualified file names of all zero-byte files in a folder tree.

The syntax for using ZeroByte.bat is:

\[call\] ZeroByte Folder

Where Folder is the folder path to enumerate.

ZeroByte.bat contains:

@echo off
if \{%1\}

\{\} @echo ZeroByte Folder&goto :EOF if not exist %1 @echo ZeroByte - %1 not found.&goto :EOF setlocal for /f "Tokens=*" %%i in ('dir %1 /s /a /b /a-d') do ( if %%~zi

0 @echo "%%i" ) endlocal

Hide comments


  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.