for /f «tokens=1-7» %%A in (dc01Scripts\%file_name%_rep_mon.log) do ( if «%%F»==»failed,» ((net send Test «Error in Replication!» & net send dc01 «Error in Replication!» & blat -subject «Error in Replication!» -body «Error in Replication!» -t test@domain.local -server dc01.domain.local -f system@domain.local & goto exit)) if «%%E»==»error» ((net send Test «DCDiag: Error in Replication!» & net send dc01 «CDiag: Error in Replication!» & blat -subject «DCDiag: Error in Replication!» -body « DCDiag: Error in Replication!» -t test@domain.local -server dc01.domain.local -f system@domain.local & goto exit)))