I have a problem here.
I tried ro read files in the web server, but I got the error message, File not found.
This is my coding,
(mainscript)
Dim serverfile
serverfile = "/angelz/path1/path2/iamfile.txt"
OpenNamedListFile(MainScriptObject.serverfile)
Sub OpenListFile(fileName)
Const ForReading = 1, ForWriting = 2, ForAppending = 8
Dim fso, f
Dim item, i, exist
Set fso = CreateObject("Scripting.FileSystemObject"
On Error Resume Next
'Error handler in case the file does not exist
Set f = fso.GetFile(fileName)
if Err.Number <> 0 then
'File does not exist
MsgBox "Error # " & CStr(Err.Number) & " " & Err.Description & " " & filename & ". Please inform the system administrator of the error."
Err.Clear ' Clear the error.
else
I got this error.
Can anyone help me? thanks.
I tried ro read files in the web server, but I got the error message, File not found.
This is my coding,
(mainscript)
Dim serverfile
serverfile = "/angelz/path1/path2/iamfile.txt"
OpenNamedListFile(MainScriptObject.serverfile)
Sub OpenListFile(fileName)
Const ForReading = 1, ForWriting = 2, ForAppending = 8
Dim fso, f
Dim item, i, exist
Set fso = CreateObject("Scripting.FileSystemObject"
On Error Resume Next
'Error handler in case the file does not exist
Set f = fso.GetFile(fileName)
if Err.Number <> 0 then
'File does not exist
MsgBox "Error # " & CStr(Err.Number) & " " & Err.Description & " " & filename & ". Please inform the system administrator of the error."
Err.Clear ' Clear the error.
else
I got this error.
Can anyone help me? thanks.