rem temporary test file can be removed (SS,4/3/11) d: cd \bin\backup rem following returns "---------- LOGTODAY.TXT: 3" or "---------- LOGTODAY.TXT: 0" i.e file name followed by count find /i /c "226 Transfer complete." logtoday.txt > findresult.txt rem check for 3 in results, i.e. 3 successful transfers find "3" findresult.txt if ERRORLEVEL 1 goto error1 rem success if this point reached goto end :error1 echo "error occurred" :end pause