'====================================================================
'Function name: CheckFile
'Function: Check whether a file exists
'Parameter: FileName-------File address such as:/swf/1.swf
'Return value: False---True
'====================================================================
PublicFunctionCheckFile(FileName)
OnErrorResumeNext
DimFsoObj
SetFsoObj=Server.CreateObject("Scripting.FileSystemObject")
IfNotFsoObj.FileExists(Server.MapPath(FileName)) Then
CheckFile=False
ExitFunction
EndIf
CheckFile=True:SetFsoObj=Nothing
EndFunction