jx2iblog_conf.ini
100-1 100-3 100-8 100-10 101-1 101-4 103-1 109-1 110-1 111-1 102-1 105-1 112-1
roleback_check.bat
::@echo off set jx2back_num=5 set jx2ibback_num=10 set jx2wzback_num=3 set date=%DATE:~0,10% set checktime=%TIME% echo 检查时间- %date% - %checktime% >"I:\check\check.txt" :::::::::::::::::::::::::::::::::::::::::::::: I: cd "I:\jx2&jx2wzROLE\jx2\%date%\" md5sum *.rar|sort > jx2_156.log type *.txt |sort>RDB_MD5_sort.log call :x if %numx% equ %jx2back_num% ( echo 收费区应有%jx2back_num%个备份,实有%numx%个备份---备份个数~~OK >> I:\check\check.txt ) else ( echo 收费区应有%jx2back_num%个备份,实有%numx%个备份---备份数不全~~速速检查'_' >> I:\check\check.txt ) echo 开始核对文件完整性…… >> I:\check\check.txt fc /W jx2_156.log RDB_MD5_sort.log >> I:\check\check.txt if %errorlevel% equ 0 ( echo 收费区备份文件完整性-----------------------OK >> I:\check\check.txt ) else ( echo 收费区备份文件完整性-------异常"~~速速检查'_' >> I:\check\check.txt ) echo. >> I:\check\check.txt echo -------------------------------------------------------- >> I:\check\check.txt :::::::::::::::::::::::::::::::::::::::::::::::: cd "I:\jx2&jx2wzROLE\jx2ib\%date%\" md5sum *.rar|sort > jx2ib_156.log type *.txt |sort>RDB_MD5_sort.log call :y if %numy% equ %jx2ibback_num% ( echo 免费区应有%jx2ibback_num%个备份,实有%numy%个备份---备份个数~~OK >> I:\check\check.txt ) else ( echo 免费区应有%jx2ibback_num%个备份,实有%numy%个备份---备份数不全~~速速检查'_' >> I:\check\check.txt ) echo 开始核对文件完整性…… >> I:\check\check.txt fc /W jx2ib_156.log RDB_MD5_sort.log >> I:\check\check.txt if %errorlevel% equ 0 ( echo 免费区备份文件完整性-----------------------OK >> I:\check\check.txt ) else ( echo 免费区备份文件完整性-------异常"~~速速检查'_' >> I:\check\check.txt ) echo. >> I:\check\check.txt echo -------------------------------------------------------- >> I:\check\check.txt :::::::::::::::::::::::::::::::::::::::::::::::: cd "I:\jx2&jx2wzROLE\jx2wz\%date%\" md5sum *.*ar*|sort >jx2wz_156.log type *.txt |sort > RDB_MD5_sort.log call :z if %numz% equ %jx2wzback_num% ( echo 外传区应有%jx2wzback_num%个备份,实有%numz%个备份---备份个数~~OK >> I:\check\check.txt ) else ( echo 外传区应有%jx2wzback_num%个备份,实有%numz%个备份---备份数不全~~速速检查'_' >> I:\check\check.txt ) echo 开始核对文件完整性…… >> I:\check\check.txt fc /W jx2wz_156.log RDB_MD5_sort.log >> I:\check\check.txt if %errorlevel% equ 0 ( echo 外传区备份文件完整性-----------------------OK >> I:\check\check.txt ) else ( echo 外传区备份文件完整性-------异常"~~速速检查'_' >> I:\check\check.txt ) echo. >> I:\check\check.txt :::::::::::::::::::::::::::::::::::::::::::::::::: exit :x for /f "tokens=1 delims=:" %%i in ('findstr /n .* RDB_MD5_sort.log') do set numx=%%i goto :eof :y for /f "tokens=1 delims=:" %%i in ('findstr /n .* RDB_MD5_sort.log') do set numy=%%i goto :eof :z for /f "tokens=1 delims=:" %%i in ('findstr /n .* RDB_MD5_sort.log') do set numz=%%i goto :eof
newlogcheck.bat
::2011-11-1 ::2.0 ::取1天之前的日期 ::MWG >tmp.vbs echo wscript.echo dateadd("d",-1,date) for /f "tokens=1,2,3* delims=-" %%i in ('cscript /nologo tmp.vbs') do ( set y=%%i set m=%%j set d=%%k ) del /Q tmp.vbs if %m% LSS 10 set m=0%m% if %d% LSS 10 set d=0%d% set DATE=%y%_%m%_%d% set MONTH=%y%_%m% if not EXIST log mkdir log rem jx2 set jx2=JX2 set conf=jx2log_conf.ini del .\log\%jx2%%DATE%.txt :::::::::::::::::::::: rem Gameserver set typ=Gameserver for /f %%i in (%conf%) do for /f %%j in ('dir J:\GLog_save\%jx2%\%MONTH%\%typ%_%%i^|find "%DATE%" ^|wc -l') do echo %%j && if %%j equ 4 (echo %%i %typ%_log ok >>.\log\%jx2%%DATE%.txt) else (echo %%i %typ%_log fail >>.\log\%jx2%%DATE%.txt) :::::::::::::::::::::: rem Script set typ=Script for /f %%i in (%conf%) do for /f %%j in ('dir J:\GLog_save\%jx2%\%MONTH%\%typ%_%%i^|find "%DATE%" ^|wc -l') do echo %%j && if %%j equ 4 (echo %%i %typ%_log ok >>.\log\%jx2%%DATE%.txt) else (echo %%i %typ%_log fail >>.\log\%jx2%%DATE%.txt) :::::::::::::::::::::: rem Trade set typ=Trade for /f %%i in (%conf%) do for /f %%j in ('dir J:\GLog_save\%jx2%\%MONTH%\%typ%_%%i^|find "%DATE%" ^|wc -l') do echo %%j && if %%j equ 4 (echo %%i %typ%_log ok >>.\log\%jx2%%DATE%.txt) else (echo %%i %typ%_log fail >>.\log\%jx2%%DATE%.txt) :::::::::::::::::::::: rem Other set typ=Other for /f %%i in (%conf%) do for /f %%j in ('dir J:\GLog_save\%jx2%\%MONTH%\%typ%_%%i^|find "%DATE%" ^|wc -l') do echo %%j && if %%j equ 4 (echo %%i %typ%_log ok >>.\log\%jx2%%DATE%.txt) else (echo %%i %typ%_log fail >>.\log\%jx2%%DATE%.txt) :::::::::::::::::::::: rem bishop set typ=bishop for /f %%i in (%conf%) do for /f %%j in ('dir J:\GLog_save\%jx2%\%MONTH%\%typ%_%%i^|find "%DATE%" ^|wc -l') do echo %%j && if %%j equ 1 (echo %%i %typ%_log ok >>.\log\%jx2%%DATE%.txt) else (echo %%i %typ%_log fail >>.\log\%jx2%%DATE%.txt) :::::::::::::::::::::: rem relay set typ=relay for /f %%i in (%conf%) do for /f %%j in ('dir J:\GLog_save\%jx2%\%MONTH%\%typ%_%%i^|find "%DATE%" ^|wc -l') do echo %%j && if %%j equ 1 (echo %%i %typ%_log ok >>.\log\%jx2%%DATE%.txt) else (echo %%i %typ%_log fail >>.\log\%jx2%%DATE%.txt) :::::::::::::::::::::: rem goddess set typ=goddess for /f %%i in (%conf%) do for /f %%j in ('dir J:\GLog_save\%jx2%\%MONTH%\%typ%_%%i^|find "%DATE%" ^|wc -l') do echo %%j && if %%j equ 2 (echo %%i %typ%_log ok >>.\log\%jx2%%DATE%.txt) else (echo %%i %typ%_log fail >>.\log\%jx2%%DATE%.txt) :::::::::::::::::::::::: :::::::::::::::::::::::: if not EXIST log mkdir log rem jx2ib set jx2=JX2IB set conf=jx2iblog_conf.ini del .\log\%jx2%%DATE%.txt :::::::::::::::::::::: rem Gameserver set typ=Gameserver for /f %%i in (%conf%) do for /f %%j in ('dir J:\GLog_save\%jx2%\%MONTH%\%typ%_%%i^|find "%DATE%" ^|wc -l') do echo %%j && if %%j equ 4 (echo %%i %typ%_log ok >>.\log\%jx2%%DATE%.txt) else (echo %%i %typ%_log fail >>.\log\%jx2%%DATE%.txt) :::::::::::::::::::::: rem Script set typ=Script for /f %%i in (%conf%) do for /f %%j in ('dir J:\GLog_save\%jx2%\%MONTH%\%typ%_%%i^|find "%DATE%" ^|wc -l') do echo %%j && if %%j equ 4 (echo %%i %typ%_log ok >>.\log\%jx2%%DATE%.txt) else (echo %%i %typ%_log fail >>.\log\%jx2%%DATE%.txt) :::::::::::::::::::::: rem Trade set typ=Trade for /f %%i in (%conf%) do for /f %%j in ('dir J:\GLog_save\%jx2%\%MONTH%\%typ%_%%i^|find "%DATE%" ^|wc -l') do echo %%j && if %%j equ 4 (echo %%i %typ%_log ok >>.\log\%jx2%%DATE%.txt) else (echo %%i %typ%_log fail >>.\log\%jx2%%DATE%.txt) :::::::::::::::::::::: rem Other set typ=Other for /f %%i in (%conf%) do for /f %%j in ('dir J:\GLog_save\%jx2%\%MONTH%\%typ%_%%i^|find "%DATE%" ^|wc -l') do echo %%j && if %%j equ 4 (echo %%i %typ%_log ok >>.\log\%jx2%%DATE%.txt) else (echo %%i %typ%_log fail >>.\log\%jx2%%DATE%.txt) :::::::::::::::::::::: rem bishop set typ=bishop for /f %%i in (%conf%) do for /f %%j in ('dir J:\GLog_save\%jx2%\%MONTH%\%typ%_%%i^|find "%DATE%" ^|wc -l') do echo %%j && if %%j equ 1 (echo %%i %typ%_log ok >>.\log\%jx2%%DATE%.txt) else (echo %%i %typ%_log fail >>.\log\%jx2%%DATE%.txt) :::::::::::::::::::::: rem relay set typ=relay for /f %%i in (%conf%) do for /f %%j in ('dir J:\GLog_save\%jx2%\%MONTH%\%typ%_%%i^|find "%DATE%" ^|wc -l') do echo %%j && if %%j equ 1 (echo %%i %typ%_log ok >>.\log\%jx2%%DATE%.txt) else (echo %%i %typ%_log fail >>.\log\%jx2%%DATE%.txt) :::::::::::::::::::::: rem goddess set typ=goddess for /f %%i in (%conf%) do for /f %%j in ('dir J:\GLog_save\%jx2%\%MONTH%\%typ%_%%i^|find "%DATE%" ^|wc -l') do echo %%j && if %%j equ 2 (echo %%i %typ%_log ok >>.\log\%jx2%%DATE%.txt) else (echo %%i %typ%_log fail >>.\log\%jx2%%DATE%.txt) :::::::::::::::::::::::: :::::::::::::::::::::::: if not EXIST log mkdir log rem jx2WZ set jx2=JX2WZ set conf=jx2wzlog_conf.ini del .\log\%jx2%%DATE%.txt :::::::::::::::::::::: rem Gameserver set typ=Gameserver for /f %%i in (%conf%) do for /f %%j in ('dir J:\GLog_save\%jx2%\%MONTH%\%typ%_%%i^|find "%DATE%" ^|wc -l') do echo %%j && if %%j equ 4 (echo %%i %typ%_log ok >>.\log\%jx2%%DATE%.txt) else (echo %%i %typ%_log fail >>.\log\%jx2%%DATE%.txt) :::::::::::::::::::::: rem Script set typ=Script for /f %%i in (%conf%) do for /f %%j in ('dir J:\GLog_save\%jx2%\%MONTH%\%typ%_%%i^|find "%DATE%" ^|wc -l') do echo %%j && if %%j equ 4 (echo %%i %typ%_log ok >>.\log\%jx2%%DATE%.txt) else (echo %%i %typ%_log fail >>.\log\%jx2%%DATE%.txt) :::::::::::::::::::::: rem Trade set typ=Trade for /f %%i in (%conf%) do for /f %%j in ('dir J:\GLog_save\%jx2%\%MONTH%\%typ%_%%i^|find "%DATE%" ^|wc -l') do echo %%j && if %%j equ 4 (echo %%i %typ%_log ok >>.\log\%jx2%%DATE%.txt) else (echo %%i %typ%_log fail >>.\log\%jx2%%DATE%.txt) :::::::::::::::::::::: rem Other set typ=Other for /f %%i in (%conf%) do for /f %%j in ('dir J:\GLog_save\%jx2%\%MONTH%\%typ%_%%i^|find "%DATE%" ^|wc -l') do echo %%j && if %%j equ 4 (echo %%i %typ%_log ok >>.\log\%jx2%%DATE%.txt) else (echo %%i %typ%_log fail >>.\log\%jx2%%DATE%.txt) :::::::::::::::::::::: rem bishop set typ=bishop for /f %%i in (%conf%) do for /f %%j in ('dir J:\GLog_save\%jx2%\%MONTH%\%typ%_%%i^|find "%DATE%" ^|wc -l') do echo %%j && if %%j equ 1 (echo %%i %typ%_log ok >>.\log\%jx2%%DATE%.txt) else (echo %%i %typ%_log fail >>.\log\%jx2%%DATE%.txt) :::::::::::::::::::::: rem relay set typ=relay for /f %%i in (%conf%) do for /f %%j in ('dir J:\GLog_save\%jx2%\%MONTH%\%typ%_%%i^|find "%DATE%" ^|wc -l') do echo %%j && if %%j equ 1 (echo %%i %typ%_log ok >>.\log\%jx2%%DATE%.txt) else (echo %%i %typ%_log fail >>.\log\%jx2%%DATE%.txt) :::::::::::::::::::::: rem goddess set typ=goddess for /f %%i in (%conf%) do for /f %%j in ('dir J:\GLog_save\%jx2%\%MONTH%\%typ%_%%i^|find "%DATE%" ^|wc -l') do echo %%j && if %%j equ 2 (echo %%i %typ%_log ok >>.\log\%jx2%%DATE%.txt) else (echo %%i %typ%_log fail >>.\log\%jx2%%DATE%.txt) :::::::::::::::::::: :::::::::::::::::::: del newlogcheck.log del newlogcheck1.log echo =======================jx2-%DATE%=====================>>newlogcheck1.log for /f "delims=" %%i in (.\log\JX2%DATE%.txt)do echo %%i>>newlogcheck1.log echo =======================jx2ib%DATE%=====================>>newlogcheck1.log for /f "delims=" %%i in (.\log\JX2IB%DATE%.txt)do echo %%i>>newlogcheck1.log echo =======================jx2wz%DATE%=====================>>newlogcheck1.log for /f "delims=" %%i in (.\log\JX2WZ%DATE%.txt)do echo %%i>>newlogcheck1.log ::::筛选fail type newlogcheck1.log |find "fail" if %ERRORLEVEL% EQU 0 ( echo SOME FAILED:>>newlogcheck.log type newlogcheck1.log |find "fail">>newlogcheck.log ) else ( echo ALL SUCCESS >>newlogcheck.log ) type newlogcheck1.log >> newlogcheck.log del newlogcheck1.log exit
newlog_sendmail.vbs
dim mailsend,fs,ts set fs = createobject ("scripting.filesystemobject") set ts = fs.opentextfile("I:\check\newlogcheck.log",1,true) ' 邮件内容存放的路径 readall = ts.readall '读取mail.txt所有内容 Const Email_From = "[email protected]" '发件人邮箱 Const Password = "yywg!@#$" '发件人邮箱密码 Const Email_To = "[email protected];[email protected];[email protected];[email protected];[email protected];[email protected];[email protected];[email protected]" Set CDO = CreateObject("CDO.Message") '创建CDO.Message对象 CDO.Subject = "剑网贰日志检查" '邮件主题 CDO.From = Email_From '发件人地址 CDO.To = Email_To '收件人地址 CDO.TextBody = readall '邮件正文 'CDO.AddAttachment "i:\check\newlogcheck.log" 邮件附件,已注释 Const schema = "http://schemas.microsoft.com/cdo/configuration/" '规定必须是这个,我也不知道为什么 With CDO.Configuration.Fields '用with关键字减少代码输入 .Item(schema & "sendusing") = 2 '使用网络上的SMTP服务器而不是本地的SMTP服务器 .Item(schema & "smtpserver") = "smtp.163.com" 'SMTP服务器地址 .Item(schema & "smtpauthenticate") = 1 '服务器认证方式 .Item(schema & "sendusername") = Email_From '发件人邮箱 .Item(schema & "sendpassword") = Password '发件人邮箱密码 .Item(schema & "smtpserverport") = 25 'SMTP服务器端口 .Item(schema & "smtpusessl") = False '是否使用SSL .Item(schema & "smtpconnectiontimeout") = 60 '连接服务器的超时时间 .Update '更新设置 End With CDO.Send '发送邮件
autocheck.bat
start /wait roleback_check.bat start /wait sendmail.vbs del check.txt start /wait newlogcheck.bat start /wait newlog_sendmail.vbs del newlogcheck.log
newlogcheck.bat v3.0
::mwg@2012-02-15 ::version3.0 ::取1天之前的日期 >tmp.vbs echo wscript.echo dateadd("d",-1,date) for /f "tokens=1,2,3* delims=-" %%i in ('cscript /nologo tmp.vbs') do ( set y=%%i set m=%%j set d=%%k ) del /Q tmp.vbs if %m% LSS 10 set m=0%m% if %d% LSS 10 set d=0%d% set DATE=%y%_%m%_%d% set MONTH=%y%_%m% if not EXIST log mkdir log rem init del configfile_check.log set typeconf=.\cofigfile_chek\type_conf.ini set log=.\log\configfile%jx2%%DATE%.txt del %log% :::::::: rem pay set banben=pay :: set qufuconf=.\cofigfile_chek\%banben%_conf.ini echo =======================jx2%banben%-%DATE%=====================>>%log% for /f %%k in (%typeconf%) do for /f %%i in (%qufuconf%) do for /f %%j in ('dir J:\gameconf_save\%banben%\%DATE%\ ^|find "%%i_%%k" ^|wc -l') do echo %%j && if %%j equ 1 (echo %%i %%kconf ok >>%log%) else (echo %%i %%kconf fail >>%log%) :::::::::::::::::::::::::::::: rem free set banben=free :: set qufuconf=.\cofigfile_chek\%banben%_conf.ini echo =======================jx2%banben%-%DATE%=====================>>%log% for /f %%k in (%typeconf%) do for /f %%i in (%qufuconf%) do for /f %%j in ('dir J:\gameconf_save\%banben%\%DATE%\ ^|find "%%i_%%k" ^|wc -l') do echo %%j && if %%j equ 1 (echo %%i %%kconf ok >>%log%) else (echo %%i %%kconf fail >>%log%) :::::::::::::::::::::::::::::: rem wz set banben=wz :: set qufuconf=.\cofigfile_chek\%banben%_conf.ini echo =======================jx2%banben%-%DATE%=====================>>%log% for /f %%k in (%typeconf%) do for /f %%i in (%qufuconf%) do for /f %%j in ('dir J:\gameconf_save\%banben%\%DATE%\ ^|find "%%i_%%k" ^|wc -l') do echo %%j && if %%j equ 1 (echo %%i %%kconf ok >>%log%) else (echo %%i %%kconf fail >>%log%) :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: ::kuafu_init set typeconf=.\cofigfile_chek\kuafu_type_conf.ini :::::::::::::::::::::::::::::: rem pay set banben=pay :: set qufuconf=.\cofigfile_chek\kuafu_%banben%_conf.ini echo =======================跨服%banben%-%DATE%=====================>>%log% for /f %%k in (%typeconf%) do for /f %%i in (%qufuconf%) do for /f %%j in ('dir J:\gameconf_save\%banben%\%DATE%\ ^|find "%%i_%%k" ^|wc -l') do echo %%j && if %%j equ 1 (echo %%i %%kconf ok >>%log%) else (echo %%i %%kconf fail >>%log%) :::::::::::::::::::::::::::::: rem free set banben=free :: set qufuconf=.\cofigfile_chek\kuafu_%banben%_conf.ini echo =======================跨服%banben%-%DATE%=====================>>%log% for /f %%k in (%typeconf%) do for /f %%i in (%qufuconf%) do for /f %%j in ('dir J:\gameconf_save\%banben%\%DATE%\ ^|find "%%i_%%k" ^|wc -l') do echo %%j && if %%j equ 1 (echo %%i %%kconf ok >>%log%) else (echo %%i %%kconf fail >>%log%) :::::::::::::::::::::::::::::: rem wz set banben=wz :: set qufuconf=.\cofigfile_chek\kuafu_%banben%_conf.ini echo =======================跨服%banben%-%DATE%=====================>>%log% for /f %%k in (%typeconf%) do for /f %%i in (%qufuconf%) do for /f %%j in ('dir J:\gameconf_save\%banben%\%DATE%\ ^|find "%%i_%%k" ^|wc -l') do echo %%j && if %%j equ 1 (echo %%i %%kconf ok >>%log%) else (echo %%i %%kconf fail >>%log%) type %log% |find "fail" if %ERRORLEVEL% EQU 0 ( echo SOME FAILED:>>configfile_check.log type %log% |find "fail">>configfile_check.log ) else ( echo ALL SUCCESS >>configfile_check.log ) type %log% >> configfile_check.log exit
GW_logarchive.bat
cd /d D:\jxonline2\jx2tools\logarchive @echo off ::取1天之前的日期 >tmp.vbs echo wscript.echo dateadd("d",-1,date) for /f "tokens=1,2,3* delims=-" %%i in ('cscript /nologo tmp.vbs') do ( set y=%%i set m=%%j set d=%%k ) del /Q tmp.vbs if %m% LSS 10 set m=0%m% if %d% LSS 10 set d=0%d% @set MONTH=%y%_%m% @set DATE=%y%_%m%_%d% @set GSDIR=D:\jxonline2\ @set WORKDIR=D:\jxonline2\jx2tools\logarchive\ @set PDIR=/jx2ib/%MONTH%/ @set FTPU=jx2uplog @set FTPP=Dc6XV4Cz @set FTPH=219.239.93.156 rem bishop_100-1 @set GWNAME2=100-1 @set LOGDIR2=D:\jxonline2\%GWNAME2%\ @set localSavePath=%WORKDIR%log-rar-save\%MONTH%\bishop_100-1 if not exist %localSavePath% ( mkdir %localSavePath% ) winrar a -inul -ep1 -o+ %localSavePath%\bishop_%DATE%.rar %LOGDIR2%Bishop\logs\KG_Bishop\%DATE% rem relay_100-1 @set localSavePath1=%WORKDIR%log-rar-save\%MONTH%\relay_100-1 if not exist %localSavePath1% ( mkdir %localSavePath1% ) winrar a -inul -ep1 -o+ %localSavePath1%\relay_%DATE%.rar %LOGDIR2%Relay\logs\KG_Relay\%DATE% rem bishop_100-3 @set GWNAME3=100-1 @set LOGDIR3=D:\jxonline2\%GWNAME3%\ @set localSavePath2=%WORKDIR%log-rar-save\%MONTH%\bishop_100-3 if not exist %localSavePath2% ( mkdir %localSavePath2% ) winrar a -inul -ep1 -o+ %localSavePath2%\bishop_%DATE%.rar %LOGDIR3%Bishop\logs\KG_Bishop\%DATE% rem relay_100-3 @set localSavePath3=%WORKDIR%log-rar-save\%MONTH%\relay_100-3 if not exist %localSavePath3% ( mkdir %localSavePath3% ) winrar a -inul -ep1 -o+ %localSavePath3%\relay_%DATE%.rar %LOGDIR3%Relay\logs\KG_Relay\%DATE% rem bishop_100-9 @set GWNAME4=100-9 @set LOGDIR4=D:\jxonline2\%GWNAME4%\ @set localSavePath4=%WORKDIR%log-rar-save\%MONTH%\bishop_100-9 if not exist %localSavePath4% ( mkdir %localSavePath4% ) winrar a -inul -ep1 -o+ %localSavePath4%\bishop_%DATE%.rar %LOGDIR4%Bishop\logs\KG_Bishop\%DATE% rem relay_100-9 @set localSavePath5=%WORKDIR%log-rar-save\%MONTH%\relay_100-9 if not exist %localSavePath5% ( mkdir %localSavePath5% ) winrar a -inul -ep1 -o+ %localSavePath5%\bishop_%DATE%.rar %LOGDIR4%Bishop\logs\KG_Bishop\%DATE% ncftpput -u %FTPU% -p %FTPP% -m -R -E -DD %FTPH% %PDIR% %localSavePath% ncftpput -u %FTPU% -p %FTPP% -m -R -E -DD %FTPH% %PDIR% %localSavePath1% ncftpput -u %FTPU% -p %FTPP% -m -R -E -DD %FTPH% %PDIR% %localSavePath2% ncftpput -u %FTPU% -p %FTPP% -m -R -E -DD %FTPH% %PDIR% %localSavePath3% ncftpput -u %FTPU% -p %FTPP% -m -R -E -DD %FTPH% %PDIR% %localSavePath4% ncftpput -u %FTPU% -p %FTPP% -m -R -E -DD %FTPH% %PDIR% %localSavePath5% :::::::::::::::: cd /d D:\jxonline2\jx2tools\logarchive dump_up.bat :::::::::::::::: exit
RDB_logarchive.bat
cd /d D:\jxonline2\jx2tools\logarchive @echo off ::取1天之前的日期 >tmp.vbs echo wscript.echo dateadd("d",-1,date) for /f "tokens=1,2,3* delims=-" %%i in ('cscript /nologo tmp.vbs') do ( set y=%%i set m=%%j set d=%%k ) del /Q tmp.vbs if %m% LSS 10 set m=0%m% if %d% LSS 10 set d=0%d% @set MONTH=%y%_%m% @set DATE=%y%_%m%_%d% @set GSDIR=D:\jxonline2\ @set WORKDIR=D:\jxonline2\jx2tools\logarchive\ @set PDIR=/jx2ib/%MONTH%/ @set FTPU=jx2uplog @set FTPP=Dc6XV4Cz @set FTPH=219.239.93.156 rem 100-1 @set LOGDIR1=D:\jxonline2\100-1 @set localSavePath1=%WORKDIR%log-rar-save\%MONTH%\goddess_100-1 if not exist %localSavePath1% ( mkdir %localSavePath1%) if not exist %LOGDIR1%Goddess\logs\KG_Goddess\%DATE% ( mkdir %LOGDIR1%Goddess\logs\KG_Goddess\%DATE% ) winrar a -inul -ep1 -o+ %localSavePath1%\Goddess_%DATE%.rar %LOGDIR1%Goddess\logs\KG_Goddess\%DATE% winrar a -inul -ep1 -o+ -r %localSavePath1%\Statistic_%DATE%.rar %LOGDIR1%Goddess\Statistic\%y%%m%%d%* rem 100-3 @set LOGDIR2=D:\jxonline2\100-3 @set localSavePath2=%WORKDIR%log-rar-save\%MONTH%\goddess_100-3 if not exist %localSavePath2% ( mkdir %localSavePath2% ) if not exist %LOGDIR2%Goddess\logs\KG_Goddess\%DATE% ( mkdir %LOGDIR2%Goddess\logs\KG_Goddess\%DATE% ) winrar a -inul -ep1 -o+ %localSavePath2%\Goddess_%DATE%.rar %LOGDIR2%Goddess\logs\KG_Goddess\%DATE% winrar a -inul -ep1 -o+ -r %localSavePath2%\Statistic_%DATE%.rar %LOGDIR2%Goddess\Statistic\%y%%m%%d%* rem 100-8 @set LOGDIR3=D:\jxonline2\100-8 @set localSavePath3=%WORKDIR%log-rar-save\%MONTH%\goddess_100-8 if not exist %localSavePath3% ( mkdir %localSavePath3%) if not exist %LOGDIR3%Goddess\logs\KG_Goddess\%DATE% ( mkdir %LOGDIR3%Goddess\logs\KG_Goddess\%DATE% ) winrar a -inul -ep1 -o+ %localSavePath3%\Goddess_%DATE%.rar %LOGDIR3%Goddess\logs\KG_Goddess\%DATE% winrar a -inul -ep1 -o+ -r %localSavePath3%\Statistic_%DATE%.rar %LOGDIR3%Goddess\Statistic\%y%%m%%d%* rem 100-10 @set LOGDIR4=D:\jxonline2\100-10 @set localSavePath4=%WORKDIR%log-rar-save\%MONTH%\goddess_100-10 if not exist %localSavePath4% ( mkdir %localSavePath4% ) if not exist %LOGDIR4%Goddess\logs\KG_Goddess\%DATE% ( mkdir %LOGDIR4%Goddess\logs\KG_Goddess\%DATE% ) winrar a -inul -ep1 -o+ %localSavePath4%\Goddess_%DATE%.rar %LOGDIR4%Goddess\logs\KG_Goddess\%DATE% winrar a -inul -ep1 -o+ -r %localSavePath4%\Statistic_%DATE%.rar %LOGDIR4%Goddess\Statistic\%y%%m%%d%* ncftpput -u %FTPU% -p %FTPP% -m -R -E -DD %FTPH% %PDIR% %localSavePath1% ncftpput -u %FTPU% -p %FTPP% -m -R -E -DD %FTPH% %PDIR% %localSavePath2% ncftpput -u %FTPU% -p %FTPP% -m -R -E -DD %FTPH% %PDIR% %localSavePath3% ncftpput -u %FTPU% -p %FTPP% -m -R -E -DD %FTPH% %PDIR% %localSavePath4%