@echo off for /f "delims=" %%i in ('dir/a-d/b') do echo %%~nxi %%~ti pause
wmic datafile where "Name='C:\\test\\a.txt'" get LastModified /value