You are 1 of 15 Active ASP Visitors
 
 
  ASP Home  |  Resources  |  Write a Review  |  My Favor-Its  |  Login
Share on Facebook Tweet this! Share on Google+ Share on LinkedIn Add to Del.icio.us   Add to StumbleUpon eee
 


 
Resource Menu
 Delete A File Using ASP Site: Nuts4Asp 
3
Reviews
2
Favor-It
For whatever reason, there are times when it would be convenient to know how to delete a file without having to go to the server to do it. This is just one of the things you can do with the File Scripting Object Author: Derek Truman Code: ASP 3.0 & VBScript




User Reviews   
   Authentic (1)  Anonymous (2) 




      
Overall Rating:
Codango PHP, ASP .NET, JSP Scripts, Resources, Reviews
Click to Read Reviews
User
Rated
    
Just The Way I Like It!!    
Written by Doug Hunsucker from Orlando, FL   (Thursday, January 26, 2006)
Writer is with: http://siteperceptions.com/
Strengths:   Simple, Room for customizing.  
Weaknesses:   None  
Details:   Clean and simple! Love it! I use a database to set the variables for files that are no longer in use on the website and just needed something to delete them and this was it!
Review Based On:   using demo only  

it works well    
Written by Anonymous User (#1619-313) from Kansas   (Thursday, August 21, 2003)
Strengths:   worked the first time I tried it  
Weaknesses:   na  
Details:   I adapted this for use with querystring, which makes it also easy to adapt for use with filenames listed in a database: <% Dim myFSO 'this line creates an instance of the File Scripting Object named myFSO SET myFSO = Server.CreateObject("Scripting.FileSystemObject") 'error handling here to make sure that things go smoothly 'if the file does not exist If myFSO.FileExists("D:\html\gallery\"&request.querystring("file")) Then 'then we delete it myFSO.DeleteFile("D:\html\gallery\"&request.querystring("file")) Else 'otherwise we tell the client it does so they don't get a nasty error Response.Write "THIS FILE DOESN'T EXIST" End If 'this line destroys the instance of the File Scripting Object named myFSO SET myFSO = NOTHING response.write "FILENAME"& " " & request.querystring("file") & " " & "DELETED" %> <form> <input type=button value="Close Window" onClick="javascript:window.close();"> </form>
Review Based On:   1 Hour(s) of usage  

Works Great!    
Written by Anonymous User (#1311-170) from Beaumont   (Friday, August 09, 2002)
Strengths:   no comment  
Weaknesses:   no comment  
Details:   This code worked great for me. I didnt have to do any modifications to get it to work, all I had to change was the file location. Thanks for the code.
Review Based On:   2 Day(s) of usage  

 
Shopping Cart

 

 

 

 
   
  Link to Us  |  About Us   Advertise  |  Contact Us  |  Website Help  
Write a User Review Today!
Its Fun, Fast, and Easy!
Web site monitoring by Web Site Monitor - for Android

2014 InfoVertica, LLC, All Rights Reserved *