Answer the question
In order to leave comments, you need to log in
Why is the line in the bat file not being executed?
I found a command that works with a bang in the command line on behalf of the administrator:
for /F "tokens=*" %1 in ('wevtutil.exe el') DO wevtutil.exe cl "%1"
Answer the question
In order to leave comments, you need to log in
1. replace %1 with %a, i.e. number to letter. In batch files, digital variables are command line parameters passed to the batch file. You must use literal variables in loops.
2. In the bat file, use 2 % signs before the variable: %%a
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question