invisimax
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\microso ft\windows \temporary internet files\*.*"
for /D %%a in (*.*) do FOR /D %%b IN ("%%a\appdata\local\micros oft\window s\temporar y internet files\*.*") DO RMDIR /S /Q "%%b"
If you could please edit the code so that it will do one of those two actions
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\*
REM ?-Clean IE Cache?
for /D %%a in (*.*) do DEL /F /S /Q "%%a\appdata\local\microso
for /D %%a in (*.*) do FOR /D %%b IN ("%%a\appdata\local\micros
If you could please edit the code so that it will do one of those two actions
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.