Most of windows systems writing log files into a file with the name of date and time stamp and all those files written inside the same folder .
But most in cases you might need to search a word or phrase within the files and check at what time or the line where this happens. The following batch script will help you to copy the lines from the files and write into another with the search word you given
@echo off
setlocal enableextensions
set “source=D:\logs\YOUR_FOLDER“
set “target=D:\logs\OUTPUT_FILE.txt“
pushd “%source%“
(for /f “tokens=1,* delims=:“ %%a in (‘ findstr /i /l /c:“SEARCH_WORD“ “*.Log“‘ ) do (
echo(%%b
)) > “%target%“
popd
You could replace YOUR_FOLDER,OUTPUT_FILE and SEARCH_WORD with your preference . enjoy