开发者

NTFS - fastest way to find file by creation/modification date

开发者 https://www.devze.com 2023-02-08 11:59 出处:网络
Given: NTFS volume folder path some date time value - lets call it $date What is the fastest way to search for all files with

Given:

  • NTFS volume
  • folder path
  • some date time value - lets call it $date

What is the fastest way to search for all files with

开发者_JAVA技巧("last modification date" > $date) or ("creation date" > $date)

Simply I want to search for all added or modified files.

For performance reasons I don't want to do recursive crawl of all subfolders and read every file attributes.

For technical reasons (i.e. UAC, NTFS documentation) I would like to avoid parsing \\.\$mft file

Is there some Windows API that will allow me to do search in that way?

Edit: One more constraint:

For maintenance reasons I don't want to be dependant on indexing service.


I can say with certainty that there is no other realistic option given the problem as stated. FindFirst et al do not have a filtering mechanism. If you were keeping up with the USN journal, there might be some leeway, but otherwise, no.


If the windows indexing service is turned on, and the files you want are indexed, you quickly find your files using the query api.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号