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 Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to keep track of a file

Status
Not open for further replies.

Mengbillar

Programmer
Jan 13, 2003
32
DE
Hi, im looking for a function or something, that tells me when a file was changed.. basically, the program should monitor the file and read its contents whenever it changes (its a log file, and logs should be recorded and analyzed). Now i think, just reading the file every second is an ineffective solution, considering the intervals are very irregular in which the file changes, but could also be several times a second. is there a function, maybe an API, that can do this? tools like UltraEdit seem to be able to do that, so i guess there must be a way :)
Thanks in advance
Meng
 
If using .NET is an option there is a simple to use FileSystemWatcher class that you can setup to do this.

I think I've seen a VB6 solution on this forum before but I can't remeber. Have you tried a keyword search of this forum?
 
A quick search returned this thread:

thread222-719707
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top