I'm having a problem getting the filesystemobject to open a text file sitting in my web folder. Is this a limitation of the fso, it works when the drive letter is specified but not when the URL is used. Any ideas?
Here's the code:
<SCRIPT language=VBScript>
<!--
Sub ReadWriteText_OnClick()
Dim fso, f1, ts, s
'Open file and read contents
Set fso = CreateObject("Scripting.FileSystemObject"
Set ts = fspenTextFile(" 1)
s = ts.ReadLine
msgbox "File contents = '" & s & "'"
ts.Close
'Open file for writing
Set f1 = fspenTextFile(" 2, True)
s = s + 1
f1.WriteLine s
f1.WriteBlankLines(1)
f1.Close
msgbox "File contents = '" & s & "'"
End Sub
-->
</SCRIPT>
Here's the code:
<SCRIPT language=VBScript>
<!--
Sub ReadWriteText_OnClick()
Dim fso, f1, ts, s
'Open file and read contents
Set fso = CreateObject("Scripting.FileSystemObject"
Set ts = fspenTextFile(" 1)
s = ts.ReadLine
msgbox "File contents = '" & s & "'"
ts.Close
'Open file for writing
Set f1 = fspenTextFile(" 2, True)
s = s + 1
f1.WriteLine s
f1.WriteBlankLines(1)
f1.Close
msgbox "File contents = '" & s & "'"
End Sub
-->
</SCRIPT>