Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

FileSystemObject Question

Status
Not open for further replies.

Mighty

Programmer
Feb 22, 2001
1,682
US
Guys,

I am just starting to try to use the FileSystem Object and I just wrote a simple program but I get the following error:


Microsoft VBScript runtime error '800a01b6'

Object doesn't support this property or method

/test1.asp, line 8


The code is as follows(line numbers in red):

1 <HTML>
2 <HEAD>
3 <TITLE> File Object Test </TITLE>
4 </HEAD>
5 <BODY>
6 <%
7 dim fso
8 fso = CreateObject(&quot;Scripting.FileSystemObject&quot;)
9 fso.Deletefile(&quot;C:\Inetpub\10 set fso = nothing
11 Response.write &quot;File Deleted!!&quot;
12 %>
13 </BODY>
14 </HTML>

can anybody help?? Mise Le Meas,

Mighty :)
 
Sorry Folks,

The eyes are not working all the best. I was missing the &quot;set&quot; keyword on line 8. Mise Le Meas,

Mighty :)
 
Try changing line 8 to read the following.

Set fso = Server.CreateObject(&quot;Scripting.FileSystemObject&quot;)

You didn't have the CreatObject command correct. That adding the server. into it should fix your problem.
 
Dynapen,

Thanks for the tip but I fixed that problem over 6 months ago. Mise Le Meas,

Mighty :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top