I have the following files in a folder
I would like to just get at the datetime portion of the filename.
The following 2 for commands work individually but I am not able to combine them into 1 nested loop to get the datetime part of the file name.
for /f "tokens=1-2 delims=." %%h in ('dir /a-d /b abc_gl_in_*.txt') do (echo %%h %%i)
for /f "tokens=1-4 delims=_" %%k in ('dir /a-d /b abc_gl_in_*.txt') do (echo %%k %%l %%m %%n)
Please help, G