Find files on Windows modified after a given date using the command line
The forfiles
command works without resorting to PowerShell. The article is here:
Find files based on modified time
Microsoft Technet documentation: forfiles
For the example above:
forfiles /P <dir> /S /D +12/07/2013
- /P The starting path to search
- /S Recurse into sub-directories
- /D Date to search, the "+" means "greater than" or "since"
You can use PowerShell to do this. Try:
Get-ChildItem -Recurse | Where-Object { $_.LastWriteTime -ge "12/27/2016" }
I was after the size of the files changed and did not have PowerShell. I used the following, but the clue came from other posts:
http://www.scotiasystems.com/blog/it-hints-and-tips/quick-way-to-find-recently-changed-files-in-windowsand Windows command for file size only
set Target=E:\userdatarem Date format is M-D-YYYYset date=12-13-2013set Filelist=d:\temp\filelist.txtset Sizelist=d:\temp\sizelist%date%.csvecho Target is %Target%echo Start date is %date%echo file list is %Filelist%echo Sizelist is %sizelist%Xcopy %Target% /D:%date% /L /S > %Filelist%echo FileSize (bytes), FileName > %sizelist%For /f "tokens=1 delims=;" %%j in (%Filelist%) do ( call :Size "%%j" )Goto :EOF:Size@echo offecho %~z1, %1 >> %sizelist%