Find files on Windows modified after a given date using the command line

You can use PowerShell to do this. Try:

Get-ChildItem -Recurse | Where-Object { $_.LastWriteTime -ge "12/27/2016" }

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 search files modified after a given date using XCOPY as in this example, looking for files since last day of 2018:

xcopy *.* c:\temp\*.* /D:12-31-2018 /L /S

In this example, you are in the directory where your search begins.

C:\temp*.* is only a syntax requisite, and nothing will be copied there.

/D:12-31-2018 specifies the files modified date you are looking for, including the specified date.

/L: Shows the filenames, including drive and path, also makes XCOPY do not copy any file.

/S: Search in subdirectories.


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-windows and Windows command for file size only

set Target=E:\userdata
rem Date format is M-D-YYYY
set date=12-13-2013
set Filelist=d:\temp\filelist.txt
set Sizelist=d:\temp\sizelist%date%.csv

echo 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 off
echo %~z1, %1 >> %sizelist%