i'm try to get a bat file to run properly. if my file finds a certain word in a file i want it to run completely. if it doesnt find the word i want it to do a :eof right now it always runs the whole script. here is copy of script... @echo off
FIND /I "X-Sender" < "d:\gfi\mailessentials\emailsecurity\failedmails\*.txt" > nul
if errorlevel 1 goto :EOF
net stop listserv /yes && net start listserv
net stop gfiasmlhost /yes && net start gfiasmlhost
net stop gfiscans /yes && net start gfiscans
net stop msecavupdate /yes && net start msecavupdate
net stop GFIScanM /yes && net start GFIScanM
net stop msecmlhost /yes && net start msecmlhost
net stop gfimetrxsvc /yes && net start gfimetrxsvc
net stop gfiasmsecatt /yes && net start gfiasmsecatt
net stop csecmlhost /yes && net start csecmlhost
net stop gfipop2exch /yes && net start gfipop2exch
net start listserv
net start msecavupdate
net start gfipop2exchcd d:\gfi\mailessentials\emailsecurity\failedmails && d:
del *.prop
ren *.txt *.emlmove d:\gfi\mailessentials\emailsecurity\failedmails\*.eml d:\exchange\transportroles\pickup
copy d:\gfi.eml "d:\exchange\transportroles\pickup"
:EOF
Replace:
FIND /I "X-Sender" < "d:\gfi\mailessentials\emailsecurity\failedmails\*.txt" > nulWith:
FIND /I "X-Sender" "d:\gfi\mailessentials\emailsecurity\failedmails\*.txt" > nul
that was it. i found this after i posted. but thank you for your help.
Yes (14) | ![]() | |
No (14) | ![]() | |
I don't know (15) | ![]() |