I have a VBS script that currently writes to a logfile. This script can be kicked off my multiple simultaneous processes so now I'm worried about concurrency.
I'm currently using FileSystemObject
to open and write to this file. Does FSO support exclusive file access?
Yes, FileSystemObject does support exclusive file access. If another process has a lock on the file when you call OpenTextFile, you will get an error (a permission denied error). You should be able to trap the error and handle it appropriately (check that Err.Number <> 0 after the call to OpenTextFile is one way you could do that).