一聚教程网:一个值得你收藏的教程网站

最新下载

热门教程

把这个组成文件就行了!,建议斑竹加精华!关键字:使用FSO按文件大小浏览文件目录并进行删除操作-AS

时间:2008-01-18 编辑:简简单单 来源:一聚教程网

<%@ Language=VBScript %>
<%Server.ScriptTimeout=50000%>
>





<%
    function JudgeParaRegular(intID)
    if intID<>"" and isnumeric(intID) then
        JudgeParaRegular=intId
    else
        Response.Write "输入错误!"    
        Response.End
    end if
    end function
    intFileSize=JudgeParaRegular(Request.QueryString("intFileSize"))
    strPath=Request.QueryString("strPath")
    if instr(strPath,":")=0 then strPath=server.MapPath(strPath)
%>
<%
function deletefiles(path)
    on error resume next
    Set fs=Server.CreateObject("Scripting.FileSystemObject")
    if fs.FileExists(path) then
        fs.DeleteFile path,True
        response.write "成功删除"&path
    else
        response.write "文件不存在!"
    end if
    Set fs=nothing
    if Err.number<>0 then Response.Write Err.number
end function
strFile=request("strFile")
if request("strFile")<>"" then
    deletefiles strFile

热门栏目