Switch to full style
ASP/ASP.net examples
Post a reply

delete file in asp

Sat Jul 14, 2012 6:28 pm

In this code snippet will show you how to delete a file in asp using FileSystemObject object
Code:

Dim OpenFileobj
MyFSOobj,MyFilePath
MyFilePath
=Server.MapPath("images/myfile.asp")
Set MyFSOobj Server.CreateObject("Scripting.FileSystemObject")
if 
MyFSOobj.fileExists(MyFilePathThen 

Response
.Write "File is found "
Response.Write "<br>Delete file "&MyFSOobj.DeleteFile(MyFilePath)
Else
Response.Write "File is not found"
End if 
Set MyFSOobj Nothing





Post a reply
  Related Posts  to : delete file in asp
 Delete a file in php     -  
 Delete file     -  
 Encrypt/Decrypt a file from source file to target file.     -  
 DELETE Commands     -  
 Delete directory in php     -  
 Delete data from database by ID in php     -  
 DML Statements, insert row, delete row     -  
 Cannot Delete Computer group     -  
 How can I delete inactive friends?     -  
 Delete session variable     -  

Topic Tags

ASP Files and I/O