Archive for July 14th, 2010

How to get vbscript to append to a file instead of writing it over?

Script Writing Tips
[ J ] a [ Y ] asked:


Hi all. I’m trying to get vbscript to append to a file instead of erasing it and writing to it from scratch. I’m not a big user of vbs and am just using it at work to get this one section of a project done. I’m probably just passing a wrong parameter or something. Any *pointers would be much appreciated.

[code]

Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objOutFile = objFSO.CreateTextFile("output.txt", 3, True)

[/code]

I’ve tried passing an ’8′ as the mode too (different sources argue over which argument gets you into appending mode), but no progress. Any tips?
sorry, removing the 3 didnt work. Any other advice?

1 comment - What do you think?
Posted by ScriptWriter - July 14, 2010 at 4:08 am

Categories: Script Writing Tips   Tags: , , , , ,