|
|
|
|
|
| | |
| |
Active Server Pages ASP a directory of ASP tutorials applications scripts components and articles for the novice to professional developer. CJWSoft ASPProtect ASPBanner ASPClassifieds
(Advanced)
(Components)
(Database)
(General)
(Vbscript)

|
|
|
|
Subject: |
Path not found error |
|
From: |
simon |
|
Date: |
9/10/2002 1:37:34 PM |
|
IP: |
195.188.42.195 |
Hi,
I am able to run the following code ok from asp:
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
Set objF = objFSO.OpenTextFile("c:\temp\test.txt")
When i try to pass a variable as the file location i.e:
dim temppath
temppath = CStr("c:\temp\test.txt")
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
Set objF = objFSO.OpenTextFile(temppath)
I get the following error:
Microsoft VBScript runtime error '800a004c'
Path not found
I cannot work this out as surely i have already dclared the variable as a styring with the 'CStr' statement?????
Any ideas????
simon
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|