Search Tools Links Login

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

About this post

Posted: 2006-09-25
By: FortyPoundHead
Viewed: 1,799 times

Categories

General

Windows

Attachments

No attachments for this post


Loading Comments ...

Comments

No comments have been added for this post.

You must be logged in to make a comment.