@echo off
SET LocalPath=%~dp0
CD /D "%LocalPath%"
SET ServerName=%1
echo ********************************************************************
echo **** Start Building Reply ****************
echo ********************************************************************
SET APP_BASE=\\%ServerName%\F$\PGSApp
SET Backup_APP_BASE=\\%ServerName%\F$\PGS_Support\Backup
SET BuilDate=2015-05-22
SET LocalFolder=PGSLogScanCenter
echo ********************************************************************
echo **** Global Const Value ****************
echo ********************************************************************
echo deploy %ServerName% ...
SET App_Folder=%APP_BASE%\%LocalFolder%
SET Backup_App_Folder=%Backup_APP_BASE%\%LocalFolder%\%BuilDate%
echo ********************************************************************
echo **** Setup Log ****************
echo ********************************************************************
::Setup logs
SET LOGFOLDER=Log
SET LOGFILE=%LOGFOLDER%\%ServerName%.log
MKDir %LOGFOLDER%
echo start at %DATE%%TIME% >>%LOGFILE% 2>&1
echo Log is ready >>%LOGFILE% 2>&1
echo *********************************************************** >>%LOGFILE% 2>&1
echo **** Backup the files ***** >>%LOGFILE% 2>&1
echo *********************************************************** >>%LOGFILE% 2>&1
md %Backup_App_Folder% >>%LOGFILE% 2>&1
XCOPY %App_Folder% %Backup_App_Folder% /I /E /Y /R >>%LOGFILE% 2>&1
echo Done >>%LOGFILE% 2>&1
echo *********************************************************** >>%LOGFILE% 2>&1
echo **** Update service component ***** >>%LOGFILE% 2>&1
echo *********************************************************** >>%LOGFILE% 2>&1
:: Different in the first time
XCOPY LSC \\%ServerName%\F$ /S /Y /R /I >>%LOGFILE% 2>&1
echo Done >>%LOGFILE% 2>&1
echo *********************************************************** >>%LOGFILE% 2>&1
echo **** END ***** >>%LOGFILE% 2>&1
echo *********************************************************** >>%LOGFILE% 2>&1
echo end at %DATE%%TIME% >>%LOGFILE% 2>&1
echo ------------------------------------------------------------>>%LOGFILE% 2>&1
echo on
XCOPY using
最新推荐文章于 2015-11-30 16:09:59 发布