28,391
社区成员
发帖
与我相关
我的任务
分享
<table width="100%" height="197" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" class="tableBorder">
<tr><form method="post" action="Img.asp?action=Backup">
<td width="100%" height="89" align="left" valign="top" bgcolor="#f1f1f1" >
<input type=text size=24 name=DBpath value="0" style="display:none;">新建文件夹:<input type=text size=24 name=bkfolder value="" onFocus="this.select();"> <input name="submit" type=submit value="开始创建" class="button" >
</td>
</form><%
if request("action")="Backup" then
Dbpath=server.mappath(request.form("Dbpath"))
bkfolder=request.form("bkfolder")
Set Fso=server.createobject("Scripting.FilesystemObject")
if fso.FolderExists(dbpath) then
If CheckDir(bkfolder) = True Then
fso.copyfolder dbpath,bkfolder
else
MakeNewsDir bkfolder
fso.copyfolder dbpath,bkfolder
end if
response.write "<script>alert('创建成功!');location.href='IMG.asp';</script>"
else
response.write "<script>alert('找不到您所需要备份的文件!');history.go(-1);</script>"
end if
end if
Function CheckDir(FolderPath)
folderpath=Server.MapPath(".")&"\"&folderpath
Set fso1 = CreateObject("Scripting.FilesystemObject")
If fso1.FolderExists(FolderPath) then
CheckDir = True
Else
CheckDir = False
End if
Set fso1 = nothing
End Function
Function MakeNewsDir(foldername)
Set fso1 = CreateObject("Scripting.FilesystemObject")
Set f = fso1.CreateFolder(foldername)
MakeNewsDir = True
Set fso1 = nothing
End Function
%>
</table>