powershell detect overwritten files

davesnb
davesnb used Ask the Experts™
on
Is there a way to find files that have been replaced by older files?  For example , I am using a simple gci ( get-childitem) to find all files with certain extensions  where last modified date is greater than yesterday's date. How would I find any new files that may have gotten overwritten by older files . Ie , someone that accidentally overwrites a config file with an older file of the same name.  is that possible in powershell using get-childitem or other ?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Top Expert 2014
Commented:
No, the filesystem does not reveal this information.  You would have to have auditing turned on for the files and then go back through event logs to find files that were overwritten.  But even then I'm not sure if it would show that it was overwritten with a file that had an older timestamp.

Author

Commented:
OK thanks for the clarification.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial