View Full Version : Editing a text file in ASP

01-18-2003, 02:56 PM
I have just started using ASP and I need to know if (and how) you can edit a text file.

What I want to be able to do is open a text file in ASP, display contents (i can do this fine) then ADD some more text to the file, then have it saved so that it has been 'UPDATED'

I would appreciate any help in this. :thumbsup:

P.S. Use VBScript if you can

01-18-2003, 08:34 PM
I have and example posted at http://www.brainjar.com/asp/fileops/

The big trick is setting up the proper security. An ASP script will normally run under a specific userid set in IIS. You need to give write access on the text file (and possibly the directory it's in) to that userid.

01-19-2003, 07:47 PM

The above link can show you how to do pretty much whatever you want with text files (and others).