NTFS - fastest way to find file by creation/modification date
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 fileIs 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.
精彩评论