Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!chinacat!sequoia!sequoia.execu.com From: jam@sequoia.execu.com (James LeBas) Newsgroups: comp.windows.ms Subject: Zero byte DOS files Message-ID: <23366@sequoia.execu.com> Date: 24 Aug 90 19:32:58 GMT Sender: jam@sequoia.execu.com Reply-To: jam@execu.com Distribution: na Organization: Execucom Systems Corp. Lines: 18 "What I am using amounts to hardly more than stone knives and bearskins." Does anybody know how to get a .bat file to test for the length of another file; specifically, for the presence of a zero byte file? A .bat file I use tests for the presence of certain files and if not found, pipes an echo to an errorlist file; in so doing, the errorlist file should contain all the error messages and can be thrown to the screen at the end of the .bat execution. The problem is, this statement: if not exist goodfile.txt echo goodfile.txt missing >> errlist creates errlist as a zero byte file, even if goodfile.txt exists. The presence of errlist should indicate that there is a problem. So if I can test for errlist's length, and act on that (by deleting it, if zero) then everything's copasetic. Thanks.