Hello, Im a newbie to scripting but I was wondering if theres a way to send a
normal txt logfile to an email recipient as part of a script
For exampl, Im scheduling the defrag command to run and output a .txt file
with the results. I would then like either the same scheduled batch or script
to email me the log file OR just a batch or script that will run after the
defrag has finished, pick up the log file and email me
Can anyone help with this
TIA

Re: Sending txt logfiles via email by Torgeir

Torgeir
Mon Oct 11 07:19:45 CDT 2004

Brad wrote:

> Hello, Im a newbie to scripting but I was wondering if theres a way to send a
> normal txt logfile to an email recipient as part of a script
> For exampl, Im scheduling the defrag command to run and output a .txt file
> with the results. I would then like either the same scheduled batch or script
> to email me the log file OR just a batch or script that will run after the
> defrag has finished, pick up the log file and email me
> Can anyone help with this
> TIA
Hi

How do I send e-mail with CDO?
http://www.aspfaq.com/show.asp?id=2026

Note the sometimes-needed requirement to fill in the smtp server name:
http://groups.google.com/groups?threadm=%23Tz6Nz5XEHA.1652%40TK2MSFTNGP09.phx.gbl


Some CDO info here as well:

Sending mail from Excel with CDO
http://www.rondebruin.nl/cdo.htm


An alternative is to use a command line tool for this:

Blat (free)
http://www.blat.net/194/

A Google newsgroup search:
http://groups.google.com/groups?as_q=blat&as_ugroup=*.scripting


--
torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway
Administration scripting examples and an ONLINE version of
the 1328 page Scripting Guide:
http://www.microsoft.com/technet/scriptcenter/default.mspx