Tutorials References Exercises Sign Up Menu
Create Website Get Certified Pro

ASP DeleteFile Method

❮ Complete FileSystemObject Object Reference

The DeleteFile method deletes one or more specified files.

Note: An error will occur if you try to delete a file that doesn't exist.



Parameter Description
filename Required. The name of the file or files to delete (Wildcards are allowed)
force Optional. A Boolean value that indicates whether read-only files will be deleted. True indicates that the read-only files will be deleted, False indicates that they will not be deleted. Default is False


dim fs
Set fs=Server.CreateObject("Scripting.FileSystemObject")
if fs.FileExists("c:\test.txt") then
end if
set fs=nothing

❮ Complete FileSystemObject Object Reference