Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Senior Coder missing-score's Avatar
    Join Date
    Jan 2003
    Location
    UK
    Posts
    2,194
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Exclamation Editing a text file in ASP

    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.

    P.S. Use VBScript if you can

  • #2
    Regular Coder
    Join Date
    Jun 2002
    Posts
    185
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.

  • #3
    Senior Coder
    Join Date
    Jun 2002
    Location
    41° 8' 52" N -95° 53' 31" W
    Posts
    3,660
    Thanks
    0
    Thanked 0 Times in 0 Posts
    http://www.w3schools.com/asp/asp_ref_filesystem.asp

    The above link can show you how to do pretty much whatever you want with text files (and others).
    Former ASP Forum Moderator - I'm back!

    If you can teach yourself how to learn, you can learn anything. ;)


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •