a developer's notes – a semi-technical web development BLOG

September 5, 2011

How to write to a text file with classic ASP

Filed under: Classic ASP — Duy Nguyen @ 1:20 pm
Tags: , , , ,

Here is a quick snippet on how to write to a text file with with Classic ASP. (VBscript)

dim filesys, filetxt
Const ForReading = 1, ForWriting = 2, ForAppending = 8
Set filesys = CreateObject("Scripting.FileSystemObject")
Set filetxt = filesys.OpenTextFile("c:\somefile.txt", ForAppending, True)
filetxt.WriteLine("Your text goes here.")
filetxt.Close 
Advertisements

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at WordPress.com.

%d bloggers like this: