Guest_imported
New member
- Jan 1, 1970
- 0
Using the FSO I am trying to open a text file using a relative path and display it in my web page. I can do this with an absolute path with no problem. When I remove the absolute path and use a relative path from my current directory I get file not found.
Here is the code:
Dim objFSO, absPath, relPath
absPath = ""
relPath = "textFiles\101.txt"
Set objFSO = Server.CreateObject("Scripting.FileSystemObject"
Set objFile = objFSO.GetFile(relPath)
absPath = objFile.Path
Dim objTextStream, ProjDescFullText
Set objTextStream = objFSO.OpenTextFile(absPath, 1)
ProjDescFullText = objTextStream.ReadAll
set objTextStream = Nothing
Set objFSO = Nothing
Set objFile = Nothing
Any help would be appriciated.
Here is the code:
Dim objFSO, absPath, relPath
absPath = ""
relPath = "textFiles\101.txt"
Set objFSO = Server.CreateObject("Scripting.FileSystemObject"
Set objFile = objFSO.GetFile(relPath)
absPath = objFile.Path
Dim objTextStream, ProjDescFullText
Set objTextStream = objFSO.OpenTextFile(absPath, 1)
ProjDescFullText = objTextStream.ReadAll
set objTextStream = Nothing
Set objFSO = Nothing
Set objFile = Nothing
Any help would be appriciated.