0
What's the most efficient (least amount of time and least CPU intensive) way to check the last time an NTFS folder had an unlimited depth child folder or file deleted, modified in any way, or created?
I have a bunch of scripts that run on a schedule and knowing this would prevent them from running if nothing has changed since the last time they ran, saving considerable CPU, memory, etc usage. Thanks!
For a given folder you can look at the time-stamps, but this won't affect the time-stamps of its indirect parent folders. Do you expect the indirect parent to be considered "modified" as well ? – Dhiwakar Ravikumar – 2015-04-07T06:05:18.307
The modified timestamp of a folder does not get updated if you modify a file or directory in a subfolder of that folder. So it's useless. I want both direct and indirect children e.g. grandchildren. – Wes – 2015-04-07T06:19:29.063
vbscript how to sort files in subfolders by modified date (and print it with the absolute path of file) -- the answer linked is a pure batch solution that uses only native commands – DavidPostill – 2015-04-07T08:28:32.700
@DavidPostill that solution wouldn't work in the case of deleted files or folders. If all that happened was a file was deleted, the scripts should run. – Wes – 2015-04-07T11:41:25.823
Maybe build something using
fsutil usn
together withfsutil transaction
? – DavidPostill – 2015-04-07T11:55:10.913