Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Count to see if file contents have changed

Status
Not open for further replies.

lpb71

Technical User
Mar 10, 2004
57
GB
I have a script that checks the content of a file(text.txt) every 30 minutes, the contents of this file (8 digit random number) should change every 30 minutes. The script checks the contents against the last check and alerts if the content is the same. Rather than send an alert each time is doesn't change, I want it to only alert if the file is the same after 3 consecutive checks. I think that I can probably do this be setting some kind of count value, but not sure how to do this.


Any help would be greatly appreciated.
 
How about writing a registry value that you can read and write to. You could then compare against that.

I hope that helps.

Regards,

Mark

Check out my scripting solutions at
Work SMARTER not HARDER. The Spider's Parlor's Admin Script Pack is a collection of Administrative scripts designed to make IT Administration easier! Save time, get more work done, get the Admin Script Pack.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top