Re: DOS How to delete files less than a minimum size in batch run


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

Posted by 20080217 on February 17, 2008 at 06:33:32:

In Reply to: DOS How to delete files less than a minimum size in batch run posted by Norm on February 15, 2008 at 11:58:58:

: DOS How to delete files less than a minimum size
: in batch run.
:
: I do not think size is an attribute, but I
: create an output file in a program and then on
: the fly need to delete it if less than say, 10
: bytes. If it is larger than that more than
: likely it is a good file, but when the program
: crashes on outputting a table (file)
: that is invalid the size is 1 to 5 bytes.
: I need to delete that file. Then when that file
: is copied with other output files, the copy
: command will give an errormessage, say
: errorlevel 1, since it cannot find one of the
: files, in a multiple copy together command, and
: the batch will abort.

##

Try this:

dir | find " "

(Note: There are exactly 17 spaces between the two double-quote marks).

On my computer running XP Pro, this command returns a listing of all the files in the current directory that are 9-bytes or less.


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 ]