Append to a file (VBScript)

This code can be found in Chapter 1 of Windows Server Cookbook

Purchase XP Cookbook or Networking Recipes for only $25 plus shipping! While supplies last.

Find out how to download all of the VBScript code from this site.

' From the book "Windows Server Cookbook" by Robbie Allen
' ISBN: 0-596-00633-0

' ------ SCRIPT CONFIGURATION ------
strFile = "c:\output.txt" ' e.g. c:\output.txt
' ------ END CONFIGURATION ---------
const ForAppending = 8
set objFSO = CreateObject("Scripting.FileSystemObject")
set objFile = objFSO.OpenTextFile(strFile, ForAppending, True)
objFile.WriteLine("Script completed: " & Now)
objFile.Close

This code has been viewed 4748 times.

New from the creators of TechTasks.com: StatSheet.com