Search found 3 matches

by SimonLothar
2022-Oct-14, 7:04 am
Forum: Windows CMD Shell
Topic: Windows Events: send e-mail
Replies: 2
Views: 2323

Re: Windows Events: send e-mail

Or slightly more compact:

Code: Select all

...
for /F "tokens=*" %%i in ('%YOUR_COMMAND%') do call :proc "%%i"
...
if /i "%WORK:~0,9%" EQU "Event ID:" (
...
if /i "%WORK:~0,12%" EQU "Description:" (
...
by SimonLothar
2022-Oct-13, 8:58 pm
Forum: Windows CMD Shell
Topic: Windows Events: send e-mail
Replies: 2
Views: 2323

Re: Windows Events: send e-mail

This works for me: @echo off cls SET YOUR_COMMAND=wevtutil qe "Microsoft-Windows-Windows Defender/Operational" /count:10 /rd:true /format:text /q:"*[System[((EventID=1005 and EventID=1015) or (EventID= 1116 and EventID= 1119) or EventID=1127 or EventID=2001 or EventID=2003 or EventID=...
by SimonLothar
2021-Sep-26, 8:10 pm
Forum: Windows CMD Shell
Topic: display the count of files in folders
Replies: 1
Views: 4266

Re: display the count of files in folders

Possibly this piece of code would do for a start: @echo off SET ID= if "%LANGUAGE%" EQU "de" SET ID=Datei(en) if "%LANGUAGE%" EQU "en" SET ID=File(s) if "%ID%" EQU "" goto :eof SET STARTDIR=c:\powershell call :func1 "%STARTDIR%" f...