discuzX2全站自动备份批处理
@echo off
echo 开始备份本站重要数据!
xcopy "D:webYUNSAFE.COMWWWROOT*.*" "D:webYUNSAFE.COMBAKBakUp%date:~0,10%WWWROOT" /i /q
xcopy "D:webYUNSAFE.COMWWWROOTapi" "D:webYUNSAFE.COMBAKBakUp%date:~0,10%WWWROOTapi" /e /i /q
xcopy "D:webYUNSAFE.COMWWWROOTarchiver" "D:webYUNSAFE.COMBAKBakUp%date:~0,10%WWWROOTarchiver" /e /i /q
xcopy "D:webYUNSAFE.COMWWWROOTconfig" "D:webYUNSAFE.COMBAKBakUp%date:~0,10%WWWROOTconfig" /e /i /q
xcopy "D:webYUNSAFE.COMWWWROOTdata" "D:webYUNSAFE.COMBAKBakUp%date:~0,10%WWWROOTdata" /e /i /q
xcopy "D:webYUNSAFE.COMWWWROOTinstall" "D:webYUNSAFE.COMBAKBakUp%date:~0,10%WWWROOTinstall" /e /i /q
xcopy "D:webYUNSAFE.COMWWWROOTRewrite" "D:webYUNSAFE.COMBAKBakUp%date:~0,10%WWWROOTRewrite" /e /i /q
xcopy "D:webYUNSAFE.COMWWWROOTsource" "D:webYUNSAFE.COMBAKBakUp%date:~0,10%WWWROOTsource" /e /i /q
xcopy "D:webYUNSAFE.COMWWWROOTstatic" "D:webYUNSAFE.COMBAKBakUp%date:~0,10%WWWROOTstatic" /e /i /q
xcopy "D:webYUNSAFE.COMWWWROOTtemplate" "D:webYUNSAFE.COMBAKBakUp%date:~0,10%WWWROOTtemplate" /e /i /q
xcopy "D:webYUNSAFE.COMWWWROOTuc_client" "D:webYUNSAFE.COMBAKBakUp%date:~0,10%WWWROOTuc_client" /e /i /q
xcopy "D:webYUNSAFE.COMWWWROOTuc_server" "D:webYUNSAFE.COMBAKBakUp%date:~0,10%WWWROOTuc_server" /e /i /q
echo 本站重要数据备份完成!
echo 开始备份本站MYSQL数据库!
xcopy "D:Program FilesMySQLMySQL Server 5.1Datayafan" "D:webYUNSAFE.COMBAKBakUp%date:~0,10%MYSQLDataYAFAN" /e /i /q
echo 数据库备份完成!
echo 开始打包所有数据!
cd D:webYUNSAFE.COMBAK
"C:Program FilesWinRARRar.exe" a -k -r -s -m1 -inul "D:webYUNSAFE.COMBAKBakUp%date:~0,10%.rar" BakUp%date:~0,10%
echo 打包所有数据完成!
exit
使用批处理清除事件查看器所有Windows EventLog日志的代码
以前装完系统后要做个Ghost,为了达到完美,每次做Ghost前都会手动清除事件查看器所有WindowsEventLog日志。后来使用了Windows2008r2/Win7后,这事变的复杂多
批处理实现的五子棋人机对战游戏
效果图:核心代码:@echooff&setlocalenabledelayedexpansionsetli0=┌───────────────────┐setli1=│┌┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┐
适合虚拟主机商的一键批量备份用户网站数据的批处理
把以下代码另存为AutoBAK.BAT文件放到你要打包的目录下双击执行即可!非常适合虚拟主机商批量备份用户网站数据:Compressfor/d%%din(%1.*.*)do"%ProgramFiles%.WinR