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

前端 未结 7 1260
南旧
南旧 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:36

    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.

提交回复
热议问题