Code: Dim objFSO
dim objOutFile
Dim sWorkingFileName
Const FOR_APPENDING = 8
sWorkingFileName = "\\servername\sharename\logfilename.txt"
If objFSO.FileExists(sWorkingFileName) Then
Set objOutFile = objFSO.OpenTextFile(sWorkingFileName, FOR_APPENDING)
Else
Set objOutFile = objFSO.CreateTextFile(sWorkingFileName)
End If
objOutFile.WriteLine "STUFF TO LOG" This script will check for the existence of the log, if it does exist, it will append more information. If it does not exist, it will create a new one
Welcome to TechIMO
__________________
Helicopters don't fly; they vibrate so much and make so much noise that the earth rejects them.
Last edited by vass0922 : April 9th, 2003 at 10:42 PM.
|