Title: Message
Here's how I do it.
 
Const ForAppending = 8
Dim fso, f
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.OpenTextFile("C:\ScriptLogs\ScriptAlert.txt", ForAppending, True)
.
.  ' steps
.
strErrorTxt = strToEmail & " " & strScriptName & " " & Err & " " & Err.Description & strErrorTxt & " " & Now()
f.WriteLine strErrorTxt
.
.
.
f.Close  'close file when script has completed
 
Michelle

617-665-3432
617-546-7770 pgr.
Clinical Application Analyst
CHA Information Technology
[EMAIL PROTECTED]

-----Original Message-----
From: Ross Stolle [mailto:[EMAIL PROTECTED]
Sent: Monday, October 25, 2004 1:06 PM
To: '[EMAIL PROTECTED]'
Subject: [Talk] Appending to an output file

Hello all,

 

Whenever I do a script, I usually write the output to a file by using the commands…

 

First I open the field

 

Open “c:\testfile.txt” for Output as #2

 

Then at the end of each loop in my script, I write output like…

 

            Write #2, field 1, field 2, etc….

 

When the script is done, I have a nice output file to view.  I know everyone does this, but I was wondering if anyone has ever opened up an existing file and appended data to it.  So, I’m wanting to keep a data file that adds onto itself every day I run the script.  Instead of “Write #2” is there another command, like “Append”?  Thanks!

 

Ross Stolle

Integration Engineer

Avera McKennan Hospital

Sioux Falls, SD

 

 


____________________

Confidentiality Notice: This e-mail message, including any attachments, is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure, or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message.

Reply via email to