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 file     -  
 Delete a file in php     -  
 Encrypt/Decrypt a file from source file to target file.     -  
 Delete directory in php     -  
 DELETE Commands     -  
 DML Statements, insert row, delete row     -  
 Cannot Delete Computer group     -  
 Delete session variable     -  
 How can I delete inactive friends?     -  
 Delete using native query     -  

Topic Tags

ASP Files and I/O