Bat Roll Out
Bat Roll Out
Rollout
@echo off
echo Start Backup
TIMEOUT /T 10
for /f "tokens=2 delims==" %%a in ('wmic OS Get localdatetime /value') do set "dt=%%a"
set "YY=%dt:~2,2%" & set "YYYY=%dt:~0,4%" & set "MM=%dt:~4,2%" & set "DD=%dt:~6,2%"
set "HH=%dt:~8,2%" & set "Min=%dt:~10,2%" & set "Sec=%dt:~12,2%"
set "fullstamp=D%YYYY%%MM%%DD%T%HH%%Min%%Sec%"
mkdir D:\"website backups"\%fullstamp%
xcopy D:\www\opiprd\Website D:\"website backups"\%fullstamp% /s /e /i /r /y /f /h /EXCLUDE:RolloutExclude.txt
echo End Backup
echo Start Stopping of Web Service
TIMEOUT /T 5
net stop MSFtpsvc
TIMEOUT /T 5
net stop SMTPSVC
TIMEOUT /T 5
net stop IISADMIN
TIMEOUT /T 5
net stop W3SVC
TIMEOUT /T 5
echo End Stopping of Web Service
echo Start Rollout
TIMEOUT /T 10
xcopy \\opiweb2\www$\Rollout D:\www\opiprd\Website /s /e /i /r /y /f /h
echo End Rollout
echo Start Starting of Web Service
TIMEOUT /T 5
net start MSFtpsvc
TIMEOUT /T 5
net start SMTPSVC
TIMEOUT /T 5
net start IISADMIN
TIMEOUT /T 5
net start W3SVC
TIMEOUT /T 5
echo End Starting of Web Service
echo Starting Site ReCache Execute
TIMEOUT /T 10
start D:\"Site Recache"\SiteReCache.exe
echo End Site ReCache Execute
Rollout Exclude
SECRET
\ebooks\
\obj\
\temp\
\upload\
\uploadedfiles\
\sitecore modeules\
\sitecore\
\sitecore_files\
\IconCache\
\App_Data\MediaCache\
\images\bookimages\
\uploadedimages\
\images\bookimages\
\pdfs\