I wonder if anyone can help?
I would like to have a error level (i think) for the below code, basically what i would like to do is run the below code if the word Unreported occurs in ims.txt. If the word Unreported does not occur in ims.txt i would like it to go back to MENU. Originally i thought i could do a simple ERRORLEVEL command but i cannot seem to get it to work. I would provide you with my attempts but i mistakenly deleted them!!!
Code: Select all
for /f "delims=" %%G in (id.txt) do (
wget --http-user=%IMSUSER% --http-password=%IMSPASS% --tries=10 -O - >> C:\Users\MatthewM.MEDICAGROUP\Desktop\UnreportorAssignBatch\%ims% %mFinURL%
)
for /f "delims=" %%a in ('type "acc.txt"') do (
for /f "tokens=1,2" %%b in ('sed -n "s/.*=\(.*\)&sps_id=\([0-9][0-9][0-9][0-9][0-9][0-9][0-9]\)');.><td>%%a.*/\1 \2/p" "ims.txt"') do (
echo the reference "%%a" returns ID="%%b" and number "%%c"
start chrome.exe %mFinSPS%
ping localhost -n 6 > nul
start ChangeToKT.exe
ping localhost -n 6 > nul
)
)
del ims.txt
goto MENU