全套供应
发表于:2007-06-30来源:作者:点击数:
标签:
function FindFile(pfilePath) on error resume next dim fs Set fs = CreateObject(Scripting.FileSystemObject) rem response.write filePath=BR FindFile=fs.FileExists(pfilePath) if err0 then err.clear findFile=false end if end function function C
function FindFile(pfilePath)
on error resume next
dim fs
Set fs = CreateObject("Scripting.FileSystemObject")
rem response.write "filePath="&pfilePath&"<BR>"
FindFile=fs.FileExists(pfilePath)
if err>0 then
err.clear
findFile=false
end if
end function
function CopyFile(fileFrom,fileTo)
on error resume next
dim fs
Set fs = CreateObject("Scripting.FileSystemObject")
rem response.write "Check file exist (" & fileFrom & ")="&cstr(fs.FileExists(FileFrom))&"<BR>"
rem response.write "fileFrom="&fileFrom & " <br>fileTo="&fileTo&"<BR>"
fs.CopyFile fileFrom, fileTo,true
if err>0 then
err.clear
CopyFile=false
else
CopyFile=True
end if
end function
function DeleteFile(fileDel)
on error resume next
dim fs
Set fs = CreateObject("Scripting.FileSystemObject")
rem response.write "Check file exist (" & fileDel & ")="&cstr(fs.FileExists(fileDel))&"<BR>"
if fs.FileExists(fileDel) then
fs.DeleteFile fileDel,true
end if
if err>0 then
err.clear
DeleteFile=false
else
DeleteFile=True
end if
end function
原文转自:http://www.ltesting.net