Open Textfile?

Results 1 to 2 of 2

Thread: Open Textfile?

  1. #1
    Jarle Moberg Guest

    Default Open Textfile?

    Hi..<BR>If I use this script:<BR>&#060;%<BR>Dim fs, a<BR>Set fs = CreateObject("Scripting.FileSystemObject")<BR>Set a = fs.OpenTextFile("c: estfile.txt", ForAppending, FALSE)<BR>...<BR>a.Close %&#062;<BR><BR><BR>Is it somehow possible to make the "c: estfile.txt" be done with a "server.mappath" thing, and not C:...?<BR><BR>From Jarle Moberg<BR><BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: Open Textfile?

    If the physical directory you want to write to is a virtual directory you can do it. For example, if you want the files to go into the actual directory c: extfiles (I would advise against putting them in the root of your hard drive) then make the directory c: extfiles a virtual directory in your website. If you give it a virtual name of /somefiles then if you do a server.mappath("/somefiles") you should get c: extfiles as the returned string. I haven&#039t actually tested any code like this but you should be able to do it.<BR><BR>Here&#039s some documentation -<BR><BR><BR>Joel<BR>

Posting Permissions

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