ASP检测文件或文件夹是否存在
版权声明:
本文为博主原创文章,转载请声明原文链接...谢谢。o_0。
更新时间:
2014-04-29 06:04:39
温馨提示:
学无止境,技术类文章有它的时效性,请留意文章更新时间,如发现内容有误请留言指出,防止别人"踩坑",我会及时更新文章
'================================
' 检测文件是否存在
' 作用 :利用fso检测文件是否存在,存在返回true,不存在返回false
' 参数 :filespes(文件位置)
Function IsExistsFile(path)
Set FSO = Server.CreateObject("Scripting.FileSystemObject")
If (FSO.FileExists(server.MapPath(path))) Then
IsExistsFile = True
Else
IsExistsFile = False
End If
set fso=nothing
End Function
'================================
' 检测文件夹是否存在
' 作用 :利用fso检测文件是否存在,存在返回true,不存在返回false
' 参数 :filespes(文件位置)
Function isExistsFolder(path)
Set FSO = Server.CreateObject("Scripting.FileSystemObject")
If (FSO.FolderExists(server.MapPath(path))) Then
isExistsFolder = True
Else
isExistsFolder = False
End If
set fso=nothing
End Function