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

前端 未结 7 1262
南旧
南旧 2021-02-04 07:40

I need to search a file on my disk modified after a given date using the command line.

For example:

   dir /S /B WHERE modified date > 12/07/2013
         


        
7条回答
  •  长发绾君心
    2021-02-04 08:21

    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  /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"

提交回复
热议问题