Home  >  Article  >  Backend Development  >  Summary of asp fso tutorial--ASP Delete method

Summary of asp fso tutorial--ASP Delete method

零下一度
零下一度Original
2017-05-22 14:18:271690browse

Let me summarize an asp fso tutorial for you - ASP Delete method. There are two examples in it. It is simple and practical. Friends who want to see it can pay attention to it.

asp fso tutorial: ASP Delete method

Delete method deletes the specified file or folder.
Grammar

FileObject.Delete[(force)]
FolderObject.Delete[(force)]
Parameter
Description
force

Optional. A Boolean value indicating whether any read-only files or folders will be deleted. True indicates that the read-only file/folder will be deleted and false indicates that it will not be deleted. Default is false.

Let’s take a look at a delete operation example on a file.

<%
dim fs,f
set fs=Server.CreateObject("Scripting.FileSystemObject")
set f=fs.GetFile("c:test.txt")
f.Delete
set f=nothing
set fs=nothing
%>

Let’s look at an example tutorial on folder operation.

<%dim fs,foset fs=Server.CreateObject("Scripting.FileSystemObject")
set fo=fs.GetFolder("c:test")fo.Deleteset fo=nothingset 
fs=nothing%>

[Related recommendations]

1. Share asp fso delete file DeleteFile and folder DeleteFolder instance code

2. asp Deltextfile delete the specified folder Specify file instance tutorial

The above is the detailed content of Summary of asp fso tutorial--ASP Delete method. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn