Delete 0KB file

February 17, 2009 at 13:22:38
Specs: Windows XP
First off let me say that I am new to
programing. What I need is just a single line
command or a simple command that I can add to
my batch file that will delete service.dat if
it equals 0KB.

If filename.ext == 0kb DEL filename.ext

Thank you for your time.

See More: Delete 0KB file

Report •

February 17, 2009 at 14:24:33
for %%f in (filename.ext) do if %%~zf == 0 del %%f

For more information on how this works, type

for /?

Report •
Related Solutions

Ask Question