Delete
削除
文法
Fileオブジェクト.Delete Option
パラメータ
読み取り専用ファイルの削除指定
Option : 削除 : True/削除しない : False
機能説明
ファイルを削除
オプションで読み取り専用ファイルの場合削除するか指定可
使用例
<%
Dim objFs, objFl, objFld, i
Set objFs = Server.CreateObject("Scripting.FileSystemObject")
Set objFl = objFs.GetFile("D:\test\test.txt")
'読取専用でも削除
objFl.Delete True
Set objFld = objFs.GetFolder("D:\test")
Set objFlCol = objFld.Files
Response.Write objFl.Path & "のファイルを表示
"
For Each i in objFlCol
Response.Write i.Name
Next
'オブジェクトを開放
Set objFlCol = Nothing
Set objFld = Nothing
Set objFl = Nothing
Set objFs = Nothing
%>
Topへ