Taken and adapted from this answer, it will recurse through all folders whether or not they are Hidden and find files whether or they are hidden:
REM Recursive scan through all folders with or without Hidden attribute for any files for /f "tokens=* delims=" %i in ('dir /b/s/a-d *') do echo "%i"
Adapted for your taste for finding all *.log
files:
REM Recursive scan through all folders with or without Hidden attribute for .log files for /f "tokens=* delims=" %i in ('dir /b/s/a-d *.log') do echo "%i"
If you want to save their directories to file myFiles.txt
:
for /f "tokens=* delims=" %i in ('dir /b/s/a-d *.log') do echo "%i">>myFiles.txt
If you want to open all your files one at time:
for /f "tokens=* delims=" %%i in ('dir /b/s/a-d *.log') do ( pause echo. echo Opening file "%%i"... notepad.exe "%%i" )