Re: How to check the size and remove the file if the size of the file is 0 byte dos):


[ Follow Ups ] [ Post Followup ] [ The EasyDOS Forum ] [ FAQ ]

Posted by 20080314 on March 14, 2008 at 03:51:20:

In Reply to: How to check the size and remove the file if the size of the file is 0 byte dos): posted by Shayantan Gupta on March 13, 2008 at 08:59:21:

: I have some files. I am looking for some DOS
: command what can find the find the size of the
: file and remove or delete the file if the the
: size is 0 byte. Whether I have to write a batch.
: Or can anyone suggest me to delete 0 byte files
: created using DOS.

##

For Windows XP:

-----------------------------------[cut here]-----------------------------------
@echo off
for /f "tokens=* delims=" %%F in ('dir /s/b/a-d \temp') do (
if 0 equ %%~zF echo del "%%F"
)
-----------------------------------[cut here]-----------------------------------

Note: Will NOT work on Windows 95/98/Me or MS-DOS




Follow Ups:



Post a Followup (use TAB key to move between boxes - NOT ENTER or RETURN)

Name:
E-Mail:

Subject:

Type your comments in the box below and SUBMIT:


[ Follow Ups ] [ Post Followup ] [ The EasyDOS Forum ] [ FAQ ]