Results 1 to 3 of 3

Thread: asp write to text file help

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jul 2000
    Location
    Scotland
    Posts
    184

    asp write to text file help

    Help,

    How do I write from an ASP page to a text file on the Server. I want to capture a couple of values and save them to C:\testing.txt on my Server.

    This is quite urgent as my site is failing..........

  2. #2
    Addicted Member rikshawdriver's Avatar
    Join Date
    Apr 2001
    Posts
    160
    Set fs = CreateObject("Scripting.FileSystemObject")
    Set a = fs.CreateTextFile("c:\testing.txt", True)
    a.WriteLine("This is a test.")
    a.Close

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Jul 2000
    Location
    Scotland
    Posts
    184
    Thanks, brilliant solution, works great.

    I'm a VB developer and considered this but thought I'd need to put in a reference to the Scripting Runtime. This just works and is brilliant.


    Cheers

Posting Permissions

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



Click Here to Expand Forum to Full Width