Sunday, August 21, 2011

Retrieving the List of Files Modified Lately

It's quite a common task to retrieve the list of files modified during the latest few days. It is easy to solve this task with the help of batch files:
@echo off
for %%i in (bmp jpg png gif) do (
forfiles -pC:\Test -s -m*.%%i -d+14 -c"cmd /c echo @PATH @FILE"
)
As far as you can see, this batch file searches for images in 'C:\Temp' folder, and shows those of them that were modified during the latest two weeks.
Hope you'll find this small example useful.

No comments:

Post a Comment

Translate