NetNodeMan
Technical User
I have a piece of code that writes to a log. It will write a timestamp and a message to that log. I've tried editing the code so that each day a new log is created but all that happens is that every time a message needs to be appended to a log a new file is opened instead.
Could anyone help with this? I have searched the forums but can't find an exact answer to my problem. My code looks as follows:
thanks in advance for any help given. I'm afraid scripting is not a strong point for me
Could anyone help with this? I have searched the forums but can't find an exact answer to my problem. My code looks as follows:
slog="c:\log\logfilename.txt"
set wshshell=createobject("wscript.shell")
set fso=createobject("scripting.filesystemobject")
if sError <= 50 then
wscript.echo now() & " Test OK" ' writes to command shell
logfile.writeline now() & " Test OK" ' wries to log
logfile.close
ie.quit
exit do
thanks in advance for any help given. I'm afraid scripting is not a strong point for me