由于公司OA需要定期备份数据库文件,及定时删除超过7天的备份文件,通过windows2008自带的windows Server Backup 备份文件夹,及forfile 来定时删除超过时间的文件 由于2008默认没有安装windwos Server Backup,需要手动安装。 Windows Server Backup工具已经包含在所有版本的Windows Server 2008中,但默认
备份文件时,添加时间戳 BackFileTool.bat ===================== @echo off set BACK_FROM=%1 set BACK_TO=%2 move %BACK_FROM% %BACK_TO%.BAK[%date:~0,4%%date:~5,2%%date:~8,2%.%time:~0,2%%time:~3,2%%time:~6,2%
备份文件的bat脚本 Backup_Files.bat+++++++++++++++++++++++++++++++++++++++++++@echo off: Backup to bakFolder must be change youself::[Edit]set baktagFolder="d:/backup": U want backups Folder must be change Y