goldtwh
04-26-2009, 03:45 AM
My hosting manager says I should be using a relative path in the following code:
Set fs = CreateObject("Scripting.FileSystemObject")
Set file = fs.OpenTextFile("C:\Inetpub\Wwwroot\dir1\dir2\results.txt")
I have tried several combinations using the following code to get the absolute path:
Dim currentdirectorypath
currentdirectorypath = Server.MapPath(".")
Seems to me the following code should work:
Set file = fs.OpenTextFile(currentdirectorypath"\results.txt")
What am I doing wrong?
Is it wrong to use an absolute path?
Is it normal for the hosting manager to supply the absolute path shown above?
Set fs = CreateObject("Scripting.FileSystemObject")
Set file = fs.OpenTextFile("C:\Inetpub\Wwwroot\dir1\dir2\results.txt")
I have tried several combinations using the following code to get the absolute path:
Dim currentdirectorypath
currentdirectorypath = Server.MapPath(".")
Seems to me the following code should work:
Set file = fs.OpenTextFile(currentdirectorypath"\results.txt")
What am I doing wrong?
Is it wrong to use an absolute path?
Is it normal for the hosting manager to supply the absolute path shown above?