ASP and text Files

Results 1 to 3 of 3

Thread: ASP and text Files

  1. #1
    Martin Guest

    Default ASP and text Files

    I don&#039t want to go through the hassle of finding out if a mail component is installed on a NT server that I&#039m remotely using. I have a form on a page to collect data. How do I, using asp, write a script to save that info into a text file and place it in a directory folder so I can later retreive?

  2. #2
    Swanand Mokashi Guest

    Default RE: ASP and text Files

    You can use filesystem object<BR>&#060;%Const ForAppending = 8<BR>Set fso = CreateObject("Scripting.FileSystemObject")<BR>&#03 9&#039FIRST DELETE The file<BR>fso.DeleteFile("c:FileName.txt")<BR><BR>&# 039open file<BR>Set ts = fso.OpentextFile("c:fileName.txt",ForAppending, True)<BR><BR>&#039Write data<BR>ts.writeLine("Data written")<BR>ts.write("More data")<BR><BR>set ts=nothing<BR>set fso=nothing%&#062;<BR><BR>hope this helps<BR>

  3. #3
    Martin Guest

    Default RE: ASP and text Files

    Follow up question: I would set the path to point to a text file on the server, right? I would place this script on the page that contains the form, right? What about the &#060;ACTION=" "&#062; attribute in the form tag, just direct it to a "thank you" page?

Posting Permissions

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