Link to home
Start Free TrialLog in
Avatar of invisimax
invisimaxFlag for United States of America

asked on

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
ASKER CERTIFIED SOLUTION
Avatar of David Lee
David Lee
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial