List files modified since set date
Posted: 03 Aug 2018 03:28
Hello Fellow Batch File Enthusiasts,
I am seeking help to write a batch file that lists only those .txt files modified on or since a given date, say 07/15/2018.
Could you please help me?
@echo off
for /f "delims=" %%a in ('dir *.txt /o:d') do (
set fileLine=%%a
set fileDate=!fileLine:~0,10!
if !fileDate! gtr 07/15/2018 echo "%%a"
)
Thank you,
-Steph
I am seeking help to write a batch file that lists only those .txt files modified on or since a given date, say 07/15/2018.
Could you please help me?
@echo off
for /f "delims=" %%a in ('dir *.txt /o:d') do (
set fileLine=%%a
set fileDate=!fileLine:~0,10!
if !fileDate! gtr 07/15/2018 echo "%%a"
)
Thank you,
-Steph