RE: blat within batch script - not running

"'Skand Bhargava' [email protected] [blat]" <[email protected]>
Newsgroups gmane.mail.blat
Message-ID <73EC02AEFC784C7D9EF964EAB3AF1DEF@extensa>
IMHierO the quotations should be totally removed.

-Skand


    

  IMHO -
  I believe that where you have the quotes in your set commands is OK, but the spaces around the equal signs is not. You 
  show in your email
    > set to = "-to eMail\@MyDomain.com"
    > set f = "-f eMail\@MyDomain.com"
    > set server = "-server smtp.MyDomain.com"

  I would instead code
      Set to=”eMail\@MyDomain.com”
      Set f=”-f eMail\@MyDomain.com”
      Set server=”-server smtp.MyDomain.com”

  A SET command without any parameters will display the contents of all the environment variables so you can check to see if they are set as you wish.

  Good luck
  Ernest



  From: mailto:[email protected] 
  Sent: Thursday, March 12, 2015 02:50 AM
  To: [email protected] 
  Subject: Re: [blat] blat within batch script - not running

    
  > 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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.