I run a script which send a set of text files to email ids. When I run each line of the script separately on the cmd, email sending is successful. But when I place all the lines in a script say script.bat and run the script , I am getting the error : [strong]health) was unexpected at this time.[/strong]
The script is :
D:healthHealth_Check_Windows.exe del D:healthoutput.txt for %f in (D:health*.txt) do (echo %f >> D:healthoutput.txt & type %f >> D:healthoutput.txt) C:WindowsSystem32blat.exe D:healthoutput.txt -subject "Health_check_Report" -to <emailid>
Software/Hardware used:
windows 2000
ASKED:
April 22, 2010 12:26 PM
UPDATED:
April 22, 2010 2:30 PM
Could you please post your script again using the editor’s ‘code’ tool ?
Also, write each backslash twice, because it is an escape character here, and please let us know what is the line of code causing the error, as ‘health’ appears many times in your script.
Thanks,