那是不可能的吧 不过有简单的方法
你可以先做一个空数据库 每次都复制一下在重命名
复制代码
<% Public Function CopyAFile(SourceFile, DestinationFile) Dim MyFile If ReportFileStatus(SourceFile) = 1 Then Set MyFile = objFSO.GetFile(SourceFile) MyFile.Copy (DestinationFile) CopyAFile = 1 Else CopyAFile = -1 End if End Function %>
<% Set fs = Server.CreateObject("Scripting.FileSystemObject") SFile = Server.MapPath("File1.txt") NFile = Server.MapPath("NewFile1.txt") on Error Resume Next fs.MoveFile SFile, NFile If Err.Number = 53 Then Response.Write File & "文件不存在!" Response.End Elseif Err.Number = 58 Then Response.Write File & "文件已存在!" Response.End Elseif Err.Number <> 0 Then Response.Write "未知错误,错误编码:" & Err.Number Response.End Else Response.Write "成功重命名文件!" & SFile &"为" &NFile& "" End If %>
你可以先做一个空数据库 每次都复制一下在重命名
复制代码
<% Public Function CopyAFile(SourceFile, DestinationFile) Dim MyFile If ReportFileStatus(SourceFile) = 1 Then Set MyFile = objFSO.GetFile(SourceFile) MyFile.Copy (DestinationFile) CopyAFile = 1 Else CopyAFile = -1 End if End Function %>
<% Set fs = Server.CreateObject("Scripting.FileSystemObject") SFile = Server.MapPath("File1.txt") NFile = Server.MapPath("NewFile1.txt") on Error Resume Next fs.MoveFile SFile, NFile If Err.Number = 53 Then Response.Write File & "文件不存在!" Response.End Elseif Err.Number = 58 Then Response.Write File & "文件已存在!" Response.End Elseif Err.Number <> 0 Then Response.Write "未知错误,错误编码:" & Err.Number Response.End Else Response.Write "成功重命名文件!" & SFile &"为" &NFile& "" End If %>