I'm trying to get all the file names of the files that were modified in the last week in a certain directory(has subdirectories). I know that the script below returns the last modified file in each subdirectory. Is it possible to do what I'm trying to do with batch script? If it is possible, what are the changes that should be made to the below script? Thanks in advance :)
@echo off
setlocal EnableDelayedExpansion
for /D %%G in (*) do (
echo %%G
cd %%G\
for /f "delims=" %%F in ('dir /b/a-d/tw') do (
set last=%%F
)
echo !last!
cd..
pause
)