ASP DeleteFile နည်းလမ်း
❮ ပြီးပြည့်စုံသော FileSystemObject အရာဝတ္ထု ရည်ညွှန်းချက်
DeleteFile နည်းလမ်းသည် သတ်မှတ်ထားသော ဖိုင်တစ်ခု သို့မဟုတ် တစ်ခုထက်ပိုသော ဖိုင်များကို ဖျက်သည်။
မှတ်ချက်- မရှိသောဖိုင်ကို ဖျက်ရန်ကြိုးစားပါက အမှားအယွင်းဖြစ်သွားပါမည်။
အထားအသို
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 |
ဥပမာ
<%
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
%>
❮ ပြီးပြည့်စုံသော FileSystemObject အရာဝတ္ထု ရည်ညွှန်းချက်