Click to See Complete Forum and Search --> : How to know what files have recently changed?


AFool
November 9th, 2005, 07:31 PM
Okay, say you have a standard window open to your desktop... then, in Word or something, you save a file to the desktop. -->the window will update and display your new file.

That's what I want to do. I want to make a program that will ask windows "Hey, what's changed in the last two hours" so I can process any files that I might need to worry about.

I've been chasing my tail for two days with this Change Journal stuff I found on MSDN:
walking_a_buffer_of_change_journal_records.asp (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/fs/walking_a_buffer_of_change_journal_records.asp)

I've got the code running, but like so many thing you find on msdn, it falls just short of useful. I get a nice long list of files that changed, but it only tells me the file names without the paths. For Example: I'll know that "somefile.txt" changed, and I'll have some crazy number to assosiate with it... but no path to somefile.txt... which makes it useless.

So my question is: has anyone attempted any kind of "check for recently changed files" sort of program? Am I heading off in the wrong direction with this Change Journal?

Thanks for any help or direction,
~Danny

PS, I'm currently parsing through all the directories I care about and it takes forever because I've got a lot of files (300,000+). so it's not about checking what files have changed, it's about performing the task in a timely manner, that's why I started looking into this Change Journal.

Also, I'm looking for a DOS, C, C++, or C# solution (I don't really care which)... but if you can do it in some other language, I'm intersted in knowing about it. I'll adapt.

PeejAvery
November 9th, 2005, 11:45 PM
That's what I want to do. I want to make a program that will ask windows "Hey, what's changed in the last two hours" so I can process any files that I might need to worry about.
Well, you can just plain search Windows and specify the file modified time. Set it to find all files modified in the last 2 hours. The wildcard would be *.*