复制文件与重名命问题....大家来看看..
--------------------------------------------下面是文件复制---------------------------------------------<%
Function CopyFiles(TempSource,TempEnd) //请问TempSource,TempEnd有什么用???
Dim FSO
Set FSO = Server.CreateObject("Scripting.FileSystemObject")
IF FSO.FileExists(TempEnd) then
Response.Write "目标备份文件 <b>" & TempEnd & "</b> 已存在,请先删除!"
Set FSO=Nothing
Exit Function
End IF
IF FSO.FileExists(TempSource) Then
Else
Response.Write "要复制的源数据库文件 <b>"&TempSource&"</b> 不存在!"
Set FSO=Nothing
Exit Function
End If
FSO.CopyFile TempSource,TempEnd
Response.Write "已经成功复制文件 <b>"&TempSource&"</b> 到 <b>"&TempEnd&"</b>"
Set FSO = Nothing
End Function
%>
--------------------------------------------下面是文件重命名--------------------------------------------
<%
randomize
ranNum=int(90000*rnd)+10000
file.FileName=year(now)&month(now)&day(now)&hour(now)&minute(now)&second(now)&ranNum&"."&GetExtendName(file.FileName)
%>
请问要怎么样才可以实现在复制文件的同时把文件重命名???ASP能实现吗????