【www.gdgbn.com--php函数】


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

本文来源:http://www.gdgbn.com/jiaocheng/16260/