【BATCH】BOESDK-Upload Deploy Tool

xiangjinling發表於2010-09-17
SDK-Upload Deploy tool (路徑均為反斜槓,|為反斜槓,使用時將|全部替換成反斜槓即可)[@more@]

rem 不顯示命令列
@ echo.
@echo off
@ echo Please input the BOE HOME_Path:
@ echo.
@ echo Default(Y): C:|Program Files|Business Objects
@ echo New (N): Input by yourself
@ echo.
:start
set/p choosed=Choose: Y or N:

if %choosed%==Y goto 11
if %choosed%==N goto 22
@ echo Sorry.Please input 'Y'or'N'.
goto start

: 11
set apphome="C:|Program Files|Business Objects
set contest=|Tomcat55|webapps|InfoViewApp
set apphome=%apphome%%contest%
set apphome
@ echo.
@ echo Start...
pause
goto dotran

: 22
set yin="
set/p costomerapphome=Input the path:
set apphome=%yin%%costomerapphome%
set contest=|Tomcat55|webapps|InfoViewApp
set apphome=%apphome%%contest%
set apphome
@ echo.
@ echo Start...
pause
goto dotran

:dotran

@ echo.
@ echo Create upload folder Start...
set addupload=|uploads"
set uploadnew=%apphome%%addupload%
set uploadnew
md %uploadnew%
@ echo Create upload folder Over!

@ echo.
@ echo Deploy CSS files Start...
set addfolder=|css"
set newfolderstr=%apphome%%addfolder%
set newfolder
md %newfolderstr%
@ echo new folder 'css' created.
xcopy .|css %newfolderstr% /s /e
@ echo Deploy CSS files Over!

@ echo.
@ echo Deploy JS files Start...
set jsfolder=|js"
set jspath=%apphome%%jsfolder%
xcopy .|js %jspath% /s /e
@ echo Deploy JS files Over!

@ echo.
@ echo Deploy Image files Start...
set addimagefolder=|images"
set newimagestr=%apphome%%addimagefolder%
set newimagestr
md %newimagestr%
@ echo new folder 'image' created.
xcopy .|images %newimagestr% /s /e
@ echo Deploy Image files Over!

@ echo.
@ echo Deploy Java files Start...
set classfolder=|WEB-INF|classes"
set classpath=%apphome%%classfolder%
xcopy .|classes %classpath% /s /e
@ echo Deploy Java files Over!


@ echo.
@ echo Deploy Jar files Start...
set jarfolder=|WEB-INF|lib"
set jarpath=%apphome%%jarfolder%
xcopy .|jars %jarpath% /s /e
@ echo Deploy Jar files Over!


@ echo.
@ echo Deploy JSP files Start...
set jspfolder="
set jsppath=%apphome%%jspfolder%
xcopy .|jsp %jsppath% /s /e
@ echo Deploy JSP files Over!

@ echo.
@ echo Deploy Upload-Tool finished!
pause
exit

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/24167472/viewspace-1038518/,如需轉載,請註明出處,否則將追究法律責任。

相關文章