First, your best solution is to abandon a pure DOS solution and use Windows Scripting. I have a script here: http://www.ericphelps.com/scripting/samples/Size that you use by passing it a file name, a comparison operator, and a size. If your statement is true, you get an errorlevel of zero. If false, an errorlevel of one. You might use it like this: start /w Size.vbs "C:\SomeFile.txt" ">" "1000" if not errorlevel 1 goto BIGGER goto NOT_BIGGER Now... on to pure DOS solutions ************************************************************* DOS under Win95 can't compare file sizes directly. So we have to fall back on sorting, which DOS can do. What we DO have available is two things: The DIR command can sort based on file size, and the SORT command can arrange a list very flexibly. ************************************************************* First, let's look at the DIR command. If you create a DUMMY file the exact same size as your decision size, you can sort the directory listing by size. If your dummy file is biggest (first in the list), great. If not, well, it must be smaller than the decision size. Use a command line like this to get largest file first: dir /o-s /b > sorted.txt All you have top do is write a batch file that can read that list and figure out which file is first in the list! It really helps if you can arrange things so only the desired file and the reference file are in the directory. ************************************************************* Now let's investigate SORT. First, we need to get the directory listing for your file and put that in a text file. Use a command line like this: dir log.txt | find "log.txt" > temp.txt If you don't know the name of your file (I assumed "log.txt" in the above example) but at least know it's going to be the only file there, try this instead: dir /a-d *.* | find "-" | find ":" > temp.txt That will get just files. Now open that file in Notepad and look at it. Heck, look at lots of typical directory listings! Notice how the file size always ENDS at the same place. What I want you to do is create a dummy file entry just exactly like the ones in the temp.txt file, but fake it's size value so it is your decision value. Save that dummy single line file. Let's call it DUMMY.TXT. Now we can put both lines, the real and the dummy together in the same file: copy dummy.txt temp.txt dir log.txt | find "log.txt" >> temp.txt Now both lines should be together in temp.txt. Again, look closely at the format of the data. Notice a line starts with 8 character file name, a space, three character extension, then... the size (preceeded by spaces). So we could say the size field starts at character position 13. Luckily the SORT command allows us to sort based on a character position. Sure, if the file names were exact in both lines (and you can make it exact, since you know the file name in this case) it wouldn't be an issue. But I'll assume the name may change. Sort it like this to get largest file first: type temp.txt | sort /R /+13 > sorted.txt Once again, just like above when using the DIR command method, all we need is to figure out which line is first. ************************************************************* Whether you decide to use the DIR method or the SORT method, the next step is to see if the dummy line is first (meaning your log file is small) or not (meaning your log file is big). Number the lines with one of the techniques shown here: http://ericphelps.com/batch/lines/numbring.htm For example, both the above methods (dir and sort) will produce a "sorted.txt" that can be processed one of these ways: type sorted.txt | find /n "." | find "[1]" | find "dummy.txt" if errorlevel 1 goto BIGFILE goto SMALLFILE fc /n sorted.txt nul | find "1: " | find "dummy.txt" if errorlevel 1 goto BIGFILE goto SMALLFILE In both of the above cases, whatever you put in the BIGFILE section will run when your file is bigger than the dummy value. The way all those FINDs work is first you number the sorted.txt file. Then you pipe the numbered file through find looking for the first number (either "[1]: or "1: " depending on the method you used to number). At that point, you'll only have the first line. Since both the DIR and SORT methods I described will put the largest file first, you get the largest file! Then you pipe that single line through find again, but this time look for the file name you know exists -- dummy.txt. True, if you know the name of the log file, you could search for it, but I'm going to assume that whether you used the DIR method or the SORT method, you generated a dummy "dummy.txt" file name to work with). If you do search for your real file, you might change the other lines like this: if not errorlevel 1 goto SMALLFILE goto BIGFILE So you're really just checking to see if the largest file is (or is not) what you were expecting. The code that goes in BIGFILE etc. might look like this: :BIGFILE copy /y log.txt c:\backup goto DONE :SMALLFILE rem - do nothing! goto DONE :DONE