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

Scheduled task script - concurrent text file access

Status
Not open for further replies.

iwebster

IS-IT--Management
Sep 21, 2002
7
GB
I am trying to run a script on several users machines at the same time to append a log file with some user data.

I have written some code using the filesystemobject, which appears to work, but sometimes log entries are missing. I am assuming that there are no locks on the logfile when multiple processes are running.

Can anyone help as to how to evercome this, so that I do not lose any data.

Thanks
 
Perhaps for each line to write, do the whole sequence of Open for Appending, WriteLine, Close.

Hope This Help, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884
 
If this really becomes a problem, you may need to maintain your logs in a DB.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top