16,721
社区成员
发帖
与我相关
我的任务
分享Return Not IO.File.Exists(strFile)
Public Function KillFileTrue(ByVal strFile As String) As Boolean
On Error Resume Next '如果因为用户权限、文件占用等原因,仍然无法粉碎,考虑其他方案。
If Not IO.File.Exists(strFile) Then Return True
SetAttr(strFile, FileAttribute.Normal)
IO.File.WriteAllText(strFile, "Deleted in " & Now)
IO.File.Delete(strFile)
Return IO.File.Exists(strFile)
End Function