Re: blat within batch script - not running
| Newsgroups | gmane.mail.blat |
|---|---|
| Message-ID | <B6DB7EA0352D4402B509455C3FFE9D26@chip> |
> Hey All- > > I have a long batch script that reboots systems. When it runs a log file > is generated and that file gets emailed right now using "bmail". > > But I've had some issues with that and I'm trying to switch to blat. > > I've set the variables as shown below and then the script runs, but when > it gets to the blat line, it never executes. All of the blat files are in > the same folder as the script. I tried doing a "cd d:\script\" and then > just launching the blat cmd, but that fails. > > I can send an email using just a cmd prompt and specifying the to, from, > server, etc. > > set to = "-to eMail\@MyDomain.com" > set f = "-f eMail\@MyDomain.com" > set server = "-server smtp.MyDomain.com" > > Then my command line is: > > d:\script\blat.exe %TO% %F% %Server% -s "%USERDOMAIN% Restart" -bodyF > "%USERDOMAIN%-%%g-%%f-%%e.txt" -superdebug -log blat.log I think I see the issue with your script file. Try these lines below, taking note of where I placed the " character for your SET statements: set "to=-to [email protected]" set "f=-f [email protected]" set "server=-server smtp.MyDomain.com" d:\script\blat.exe %TO% %F% %Server% -s "%USERDOMAIN% Restart" -bodyF "%USERDOMAIN%-%%g-%%f-%%e.txt" -superdebug -log blat.log -- Chip