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.
Syntax
FileSystemObject.DeleteFile(filename[,force])
|
| 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 |
Example
<%
dim fs
Set fs=Server.CreateObject("Scripting.FileSystemObject")
fs.CreateTextFile("c:\test.txt",True)
if fs.FileExists("c:\test.txt") then
fs.DeleteFile("c:\test.txt")
end if
set fs=nothing
%>
|
Complete FileSystemObject Object Reference
The Altova MissionKit is a suite of intelligent XML tools, including:
XMLSpy® – industry-leading XML editor
- Support for all XML-based technologies
- Graphical editing views, powerful debuggers, code generation, & more
MapForce® – graphical data mapping tool
- Drag-and-drop data conversion with code generation
- Support for XML, DBs, EDI, Excel® 2007, text, Web services
StyleVision® – visual stylesheet designer
- Drag-and-drop stylesheet design for XML & databases
- Output to HTML, PDF, RTF, Word 2007, & more
And more…
Try before you buy with a free fully functional 30-day trial
Download today
|