to delete an exist file (can be .txt
.asp .php .jpg .pl ...any file)
删除一已经确认存在的档案
Description:
To delete a file " a.txt "
Set fso=Server.CreateObject("Scripting.FileSystemObject")
often be used
Path : identify the root on server
FileExists : to make sure the file is exist ,
or it will not working fine
Set fso=Server.CreateObject("Scripting.FileSystemObject")
常被使用在档案与数据夹的呼叫
Path : 可帮助束记数据主机路径
FileExists : 确认是否存在后才执行是不可缺保障检查,免得出现错误讯息
<%
dim fso
Set fso=Server.CreateObject("Scripting.FileSystemObject")
Path="c:\myWebDir\"
if fso.FileExists(Path&"a.txt") then
fso.DeleteFile(Path&"a.txt")
end if
set fso=nothing
%>