Gokul's Blog


Leave a comment

Delete 0KB file

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