- Create a file named
diagscript.bat
with contents based
on the following. Add your desired commands between the
echo ... Iteration
and the timeout
lines.
@echo off
SETLOCAL ENABLEDELAYEDEXPANSION
:loop
echo [%date% %time%] Iteration
timeout /t 30 > NUL
goto loop
- Open a command prompt and change directory to where you would like
to store the script output:
cd C:\
- Execute the script and redirect output to a file:
C:\diagscript.bat > diagstdlogs.txt 2>&1
- When you are ready to stop the script, kill it by typing
Ctrl^C
in the command prompt window.
- Upload
diagstdlogs.txt
and any other relevant
logs.
Previous Section (Looping Shell Script Recipe) |
Next Section (Troubleshooting Linux Recipes) |
Back to Table of Contents