| 1. |
Solve : Do Loop?? |
|
Answer» I am trying to perform a function that will send out an email and retry the function until it passes my condition. It has been a few years since I have used batch commands and I am in need of some help. Here is what I have so far: :start C:\>cat gostart.bat Code: [Select]@echo off :start echo Enter errorleve set /p errorlevel= if %errorlevel% GTR 0 goto fail goto start :fail REM c:\Email.bat [emailprotected] echo "Execution Failed" "The scheduled job failed to execute" goto start C:\> gostart.bat Output: Enter errorleve -10 Enter errorleve 0 Enter errorleve 66 "Execution Failed" "The scheduled job failed to execute" Enter errorleve 2 "Execution Failed" "The scheduled job failed to execute" Enter errorleve -7 Enter errorleve |
|