Gokul's Blog

Delete 0KB file

Leave a comment

for /r %F in (*) do if %~zF==0 del "%F" 

If you need this in a batch file, then you need to double the %:

for /r %%F in (*) do if %%~zF==0 del "%%F"
Source Url: http://stackoverflow.com/questions/4176962/recursively-delete-0kb-files-using-windows-cmd
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s