sub copyfile(FileName1,filename2) '这是一个用于改文件名的函数
On Error Resume Next
set fs=createobject("scrip"&"ting.filesys"&"temob"&"ject")
if instr(filename1,":")<>0 then
path1=filename1
else
path1=server.MapPath(FileName1)
end if
if instr(filename2,":")<>0 then
path1=filename2
else
path2=server.MapPath(FileName2)
end if
fs.copyfile path1,path2
set ts=nothing
end sub
时间: 2024-10-03 14:44:46