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>
Free Guide: Managing storage for virtual environments
Complete a brief survey to get a complimentary 70-page whitepaper featuring the best methods and solutions for your virtual environment, as well as hypervisor-specific management advice from TechTarget experts. Don’t miss out on this exclusive content!
No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.
Your password has been sent to:firstname.lastname@example.org
To follow this tag...
Thanks! We'll email you when relevant content is added and updated.
Share this item with your network: