I have batch script which displays the variable content (%Build%) in a mail body.
for example if the Varaible content is having: %Build%= aa001.skc
the mail which is triggered by the script has the mail body as below (OUTPUT).
"Skip file generated for the files aa001.skc"
(Imagine test.log contains the value aa001.skc in it)
below is my current script for the same:
@echo off
for /f "delims=" %%x in (C:\Users\Desktop\test.log) do (
set Build=%%x
echo %Build%
)
"blat.exe" -to "abc@gmail.com" -cc "abc@gmail.com","xyz@gmail.com" -f 123@test.com -body "Skip file generated for the files %Build%" -subject "Skip file found" -server mailout.xyz.com
exit
But if the test.log contains values as
aa001.skc
aa002.skc
aa003.skc
with the above script my output is showing only as below in the mail body. Current output: "Skip file generated for the files aa003.skc" (Its taking the last value, not sure how to put it in for loop in mail body)
But my OUTPUT of the mail body should be like below.
"Skip file generated for the files
aa001.skc
aa002.skc
aa003.skc"
Kindly help me achieve the same.