Is there any way that a VBScript can open a file for appending, without
preventing other processes from opening the file for reading? Unfortunately,
the OpenTextFile method doesn't seem to provide a parameter for specifying
the file sharing mode.

Thanks!
--
Joseph Morales
[To reply directly, remove "deletethispart." from my E-mail address ]

Re: File Sharing by VBScripts by Michael

Michael
Thu Feb 16 18:46:54 CST 2006

Joseph Morales wrote:
> Is there any way that a VBScript can open a file for appending,
> without preventing other processes from opening the file for reading?
> Unfortunately, the OpenTextFile method doesn't seem to provide a
> parameter for specifying the file sharing mode.
>

FSO methods for appending use file locks for exclusive use. I don't know of
any other COM scropable file i/o methods to do what you ask. An option is
to write your own (say in VB6 or <shudder> C++ or as a .Net assembly
designed for COM InterOp).


--
Michael Harris
Microsoft MVP Scripting

Scripting: Your First Steps
http://www.microsoft.com/technet/scriptcenter/topics/beginner/firststeps.mspx