• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 608
  • Last Modified:

Email Confirmation from a batch file running

I'm looking for the most effective way to either send an email confirmation back to me after a temp file delete batch file runs. We have it now so that the batch file creates a log in the event viewer as that is something that we can report on, But we're having issues with it creating the event on different computers.

I would like help with either creating an email after the .bat file is ran, or a way to generate an event log after it's ran.

Here is the code
@echo off
cd /D C:\users
REM ?-Clean Temp Folder?
for /D %%a in (*.*) do DEL /F /S /Q "%%a\appdata\local\Temp\*.*"
for /D %%a in (*.*) do FOR /D %%b IN ("%%a\appdata\local\Temp\*.*") DO RMDIR /S /Q "%%b"
REM ?-Clean IE Cache?
for /D %%a in (*.*) do DEL /F /S /Q "%%a\appdata\local\microsoft\windows\temporary internet files\*.*"
for /D %%a in (*.*) do FOR /D %%b IN ("%%a\appdata\local\microsoft\windows\temporary internet files\*.*") DO RMDIR /S /Q "%%b"


If you could please edit the code so that it will do one of those two actions
0
invisimax
Asked:
invisimax
1 Solution
 
David LeeCommented:
Hi, invisimax.

Blat is probably the simplest way to accomplish this.  It's a free utility that allows you to send an email from a command line.
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now