attitude rb
2004-08-04 15:34:14 UTC
Okay, I give. I've been searching everywhere for help on this error and
nothing has worked. I'm trying to do something very simple using the
FileSystemObject and it won't work. All I want to do is read the files
and folders on my system using the following code in vbscript:
Set fso = Server.CreateObject("Scripting.FileSystemObject")
Set f1d = fso.GetFile("C:\Downloads\test.txt")
Response.Write(fld.Path)
When it gets to the line using the "GetFile" or the "GetFolder" methods
it throws this error:
Microsoft VBScript runtime (0x800A01B6)
Object doesn't support this property or method: 'GetFile'
However when I use either of the following, they do work:
fln = fso.GetFileName("C:\Downloads\test.txt")
Response.Write(fln & "<br>")
or,
If fso.FolderExists("C:\Downloads") then
Response.Write("There is a folder named \Downloads")
End if
Does anyone know what could be preventing this from working?
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
nothing has worked. I'm trying to do something very simple using the
FileSystemObject and it won't work. All I want to do is read the files
and folders on my system using the following code in vbscript:
Set fso = Server.CreateObject("Scripting.FileSystemObject")
Set f1d = fso.GetFile("C:\Downloads\test.txt")
Response.Write(fld.Path)
When it gets to the line using the "GetFile" or the "GetFolder" methods
it throws this error:
Microsoft VBScript runtime (0x800A01B6)
Object doesn't support this property or method: 'GetFile'
However when I use either of the following, they do work:
fln = fso.GetFileName("C:\Downloads\test.txt")
Response.Write(fln & "<br>")
or,
If fso.FolderExists("C:\Downloads") then
Response.Write("There is a folder named \Downloads")
End if
Does anyone know what could be preventing this from working?
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!