VOOZH about

URL: https://www.geeksforgeeks.org/websites-apps/asp-deletefile-method/

⇱ ASP DeleteFile Method - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

ASP DeleteFile Method

Last Updated : 2 Mar, 2021

The ASP DeleteFile Method is used to delete one or more files from the server. It returns an error if we want to delete a non-existing file. 

Syntax:

FileSystemObject.DeleteFile(filename[,force])

Parameter Values:

  • filename: It specifies the name of the file which you want to delete.
  • force: It is an optional attribute. It contains a Boolean value which indicates that whether a read-only file will be deleted or not.  It set to true means that the read-only file will be deleted. False represents that the file will not be deleted.

Example: Below example demonstrates the DeleteFile Method. 

Output:

Exist file is Deleted
Comment
Article Tags: