检查当前目录下是否存在指定的文件 如果存在就重新命名,检查当前目录下是否存在指定的文件,如果存在就重新命名
<%
function JudgeFileExit(strFileName)
Dim objFSO,objFile,objFJ
Dim strFilePath
Dim blFJ
Dim intFlag
intFlag=0
set objFSO=CreateObject("")
strFilePath=("")
if right(strFilePath,1)<"/" or right(strFilePath,1)<"" then
strFilePath=strFilePath&""
end if
blFJ=objFSO.FileExists(strFilePath&strFileName)
do while blFJ=true
intFlag=intFlag+1
blFJ=objFSO.FileExists(strFilePath &intFlag&strFileName)
loop
if intFlag=0 then
JudgeFileExit= strFileName
else
JudgeFileExit=intFlag&strFileName
end if
set objFSO=nothing
end function
Response.Write JudgeFileExit("22.htm")
%
如果觉得《检查当前目录下是否存在指定的文件 如果存在就重新命名》对你有帮助,请点赞、收藏,并留下你的观点哦!