<% LoginID=Session("LoginID") if LoginID="" then response.end if request("cmd1")<>"" then CopyOneDir "../FileDir/"&LoginID, "../FileBackup/"& LoginID response.write "您的私人目录备份完成！" response.write "备份目录位置："&server.mappath("../FileBackup/"& LoginID) response.write "
[返回]" response.end end if if request("cmd2")<>"" then CopyOneDir "../FileDir/"&LoginID&"_Share", "../FileBackup/"& LoginID&"_Share" response.write "您的私人共享备份完成！" response.write "备份目录位置："&server.mappath("../FileBackup/"& LoginID&"_Share") response.write "
[返回]" response.end end if %>
文件备份
您只需要点以下两个按扭就可以备份你的全部文件。

<% sub CopyOneDir (FilePath1,FilePath2) FilePath1=Server.Mappath(trim(FilePath1)) FilePath2=Server.Mappath(trim(FilePath2)) dim fs,f Set fs = server.CreateObject("Scripting.FileSystemObject") if not fs.FolderExists(FilePath2) then fs.CreateFolder FilePath2 end if if trim(FilePath1)<>"" and fs.FolderExists(FilePath1) then set f=fs.GetFolder(FilePath1) f.Copy FilePath2,true end if set fs=nothing end sub %>