Please support our ASP advertiser: Lunarpages ASP Web Hosting
Views: 1925 | Replies: 5
![]() |
•
•
Join Date: Jul 2004
Location: Sydney, Australia
Posts: 166
Reputation:
Rep Power: 5
Solved Threads: 7
The FSO is the object you need to use. There could be an error in your code which is preventing it from working (wouldn't know without seeing your code), or more likely you do not have/have not set the required permissions on the folder/files you are trying to delete.
If I've been a help please confirm by clicking the Add to Lafinboy's Reputation link in the header of this reply.
Lafinboy Productions
:: Website Design :: Website Development ::
Lafinboy Productions
:: Website Design :: Website Development ::
•
•
Join Date: Mar 2006
Posts: 20
Reputation:
Rep Power: 3
Solved Threads: 0
I have already set up the correct permissions for all the related folders, just that they are still not able to work, and I kept getting the "Internal Server Error: 500", do you have any idea where the problem is?
The codes are shown below, it's just a short one:
Set ScriptObject = Server.CreateObject("Scripting.FileSystemObject")
ScriptObject.DeleteFile(filename)
The codes are shown below, it's just a short one:
Set ScriptObject = Server.CreateObject("Scripting.FileSystemObject")
ScriptObject.DeleteFile(filename)
•
•
Join Date: Jul 2004
Location: Sydney, Australia
Posts: 166
Reputation:
Rep Power: 5
Solved Threads: 7
First step to help you debug is to turn off 'Show Friendly HTTP error messages' in your browser. This can be done by clicking on the Tools tab on teh toolbar, then Internet Options and select the Advanced tab. Scroll down through the Browsing section and uncheck teh box next to 'Show Friendly HTTP error messages'. Your browser will then display a much more meaningfull error message. Post the new error message here and we'll see what we can do to fix up your problem.
If I've been a help please confirm by clicking the Add to Lafinboy's Reputation link in the header of this reply.
Lafinboy Productions
:: Website Design :: Website Development ::
Lafinboy Productions
:: Website Design :: Website Development ::
•
•
Join Date: May 2006
Posts: 6
Reputation:
Rep Power: 0
Solved Threads: 1
<%
dim FileName,FS1
FileName=Server.MapPath("<FolderName/Filename>")
Set FS1 = CreateObject("Scripting.FileSystemObject")
FS1.DeleteFile FileName
%>
For deleting the file, give ur foldername/filename like
FileName=Server.MapPath("Images/test.gif")
If u find this useful inform me...my Id is radha_992@yahoo.co.in
dim FileName,FS1
FileName=Server.MapPath("<FolderName/Filename>")
Set FS1 = CreateObject("Scripting.FileSystemObject")
FS1.DeleteFile FileName
%>
For deleting the file, give ur foldername/filename like
FileName=Server.MapPath("Images/test.gif")
If u find this useful inform me...my Id is radha_992@yahoo.co.in
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)





Linear Mode