anchor.diff:  move *.log ../LOGS
   cd ..
   
  +cd INSTALL-SHARED/ORACLE
  +sqlplus "%Riceun%"/"%Ricepw%"@"%RiceDBSvrNm%" < KR_SEQ_BS.sql
  +move *.log ../../LOGS/
  +cd ../..
  +
   :3.0.1ORACLE
  -cd POST-RELEASE-3_0_1-SCRIPT
  -if /i "%mode%" == "BUNDLE" sqlplus "%un%"/"%pw%"@"%DBSvrNm%" < POST-3_0_1-KR-2011-01-26-ORACLE.sql
  -if /i "%mode%%InstRice%" == "EMBEDY" sqlplus "%Riceun%"/"%Ricepw%"@"%RiceDBSvrNm%" < POST-3_0_1-KR-2011-01-26-ORACLE.sql
  -move *.log ../LOGS
  -cd ..
  +cd KC-RELEASE-3_1_SP1-SCRIPT
  +sqlplus "%un%"/"%pw%"@"%DBSvrNm%" < KC-Release-3_0_1-3_1_S1-Upgrade-Oracle-Install.sql
  +
  +if /i "%mode%%InstRice%" == "EMBEDY" goto 3.1.SP1ORACLERICE
  +if /i "%mode%" == "BUNDLE" goto 3.1.SP1ORACLERICE
  +goto 3.1.SP1ORACLEFINISH
  +
  +:3.1.SP1ORACLERICE
  +sqlplus "%Riceun%"/"%Ricepw%"@"%RiceDBSvrNm%" < KR-Release-3_0_1-3_1_S1-Upgrade-Oracle-Install.sql
  +sqlplus "%Riceun%"/"%Ricepw%"@"%RiceDBSvrNm%" < KR-Server-Release-1_0_3-1_0_3_1-Upgrade-Oracle-Install.sql
  +
  +:3.1.SP1ORACLEFINISH
  +move *.log ../LOGS
  +cd ..
  +
  +cd KC-RELEASE-3_1_SP2-SCRIPT
  +sqlplus "%un%"/"%pw%"@"%DBSvrNm%" < KC-RELEASE-3_1_SP2-Upgrade-ORACLE.sql
  +
  +if /i "%mode%%InstRice%" == "EMBEDY" goto 3.1.SP2ORACLERICE
  +if /i "%mode%" == "BUNDLE" goto 3.1.SP2ORACLERICE
  +goto 3.1.SP2ORACLEFINISH
  +
  +:3.1.SP2ORACLERICE
  +sqlplus "%Riceun%"/"%Ricepw%"@"%RiceDBSvrNm%" < KR-RELEASE-3_1_SP2-Upgrade-ORACLE.sql
  +
  +:3.1.SP2ORACLEFINISH
  +move *.log ../LOGS
  +cd ..
  +
  +cd INSTALL-SHARED/ORACLE
  +sqlplus "%Riceun%"/"%Ricepw%"@"%RiceDBSvrNm%" < KR_CLEAN_SEQ_BS.sql
  +move *.log ../../LOGS/
  +cd ../..
   
   goto FINISH
   
   :NEWMYSQL
  -cd KC-RELEASE-2_0-SCRIPT
  +cd KC-RELEASE-3_0-CLEAN/mysql
   if /i "%mode%" == "BUNDLE" (
  -mysql -u %un% -p%pw% -D %un% -s -f < KR-Release-1_0_2-Server-MySql-Install.sql > KC-Release-1_0_2-Server-MySql-Install.log 2>&1
  -mysql -u %un% -p%pw% -D %un% -s -f < KC-Release-2_0-Base-Bundled-MySql-Install.sql > KC-Release-2_0-Base-Bundled-MySql-Install.log 2>&1
  -mysql -u %un% -p%pw% -D %un% -s -f < KC-Release-2_0-Base-Rice-MySql-Install.sql > KC-Release-2_0-Base-Rice-MySql-Install.log 2>&1
  -)
  -if /i "%mode%%InstRice%" == "EMBEDY" mysql -u %Riceun% -p%Ricepw% -D %Riceun% -s < KR-Release-1_0_2-Server-MySql-Install.sql > KR-Release-1_0_2-Server-MySql-Install.log 2>&1
  +mysql -u %un% -p%pw% -D %un% -s -f < mysql_bundled.sql
  +)
  +if /i "%mode%%InstRice%" == "EMBEDY" (
  +mysql -u %Riceun% -p%Ricepw% -D %Riceun% -s < mysql_server.sql
  +)
   if /i "%mode%" == "EMBED" (
  -mysql -u %un% -p%pw% -D %un% -s -f < KR-Release-1_0_2-Client-MySql-Install.sql > KR-Release-1_0_2-Client-MySql-Install.log 2>&1
  -mysql -u %un% -p%pw% -D %un% -s -f < KC-Release-2_0-Base-Bundled-MySql-Install.sql > KC-Release-2_0-Base-Bundled-MySql-Install.log 2>&1
  -mysql -u %Riceun% -p%Ricepw% -D %Riceun% -s -f < KC-Release-2_0-Base-Rice-MySql-Install.sql > KC-Release-2_0-Base-Rice-MySql-Install.log 2>&1
  -)
  -move *.log ../LOGS
  -cd ..
  -
  -:2.0MYSQL
  -cd KC-RELEASE-3_0-SCRIPT
  -if /i "%mode%" == "BUNDLE" (
  -mysql -u %un% -p%pw% -D %un% -s -f < RICE-1_0_2-1_0_3/update_final_mysql.sql > update_final_mysql.log 2>&1
  -mysql -u %un% -p%pw% -D %un% -s -f < KC-Release-2_0-3_0-Upgrade-MySql-Install.sql > KC-Release-2_0-3_0-Upgrade-MySql-Install.log 2>&1
  -mysql -u %un% -p%pw% -D %un% -s -f < KR-Release-2_0-3_0-Upgrade-MySql-Install.sql > KR-Release-2_0-3_0-Upgrade-MySql-Install.log 2>&1
  -)
  -if /i "%mode%%InstRice%" == "EMBEDY" mysql -u %Riceun% -p%Ricepw% -D %Riceun% -s -f < RICE-1_0_2-1_0_3/update_final_mysql.sql > update_final_mysql.log 2>&1
  -if /i "%mode%" == "EMBED" (
  -mysql -u %un% -p%pw% -D %un% -s -f < RICE-1_0_2-1_0_3/update_client_final_mysql.sql > update_client_final_mysql.sql 2>&1
  -mysql -u %un% -p%pw% -D %un% -s -f < KC-Release-2_0-3_0-Upgrade-MySql-Install.sql > KC-Release-2_0-3_0-Upgrade-MySql-Install.log 2>&1
  -mysql -u %Riceun% -p%Ricepw% -D %Riceun% -s -f < KR-Release-2_0-3_0-Upgrade-MySql-Install.sql > KC-Release-2_0-3_0-Upgrade-MySql-Install.log 2>&1
  -)
  -move *.log ../LOGS
  -cd ..
  +mysql -u %un% -p%pw% -D %un% -s -f < mysql_client.sql
  +)
  +move *.log ../../LOGS/
  +cd ../..
   
   :3.0MYSQL
  -cd KC-RELEASE-3_0-SCRIPT
  -mysql -u %un% -p%pw% -D %un% -s -f < KC-Release-3_0-3_0_1-Upgrade-MySql-Install.sql > KC-Release-2_0-3_0-Upgrade-MySql-Install.log 2>&1
  -move *.log ../LOGS
  -cd ..
  +cd KC-RELEASE-3_0_1-SCRIPT
  +mysql -u %un% -p%pw% -D %un% -s -f < KC-Release-3_0-3_0_1-Upgrade-Mysql-Install.sql > KC-Release-3_0-3_0_1-Upgrade-Mysql-Install.log 2>&1
  +move *.log ../LOGS
  +cd ..
  +
  +cd INSTALL-SHARED/MYSQL
  +mysql -u %Riceun% -p%Ricepw% -D %Riceun% -s < KR_SEQ_BS.sql > KR_SEQ_BS-Mysql-Install.log 2>&1
  +move *.log ../../LOGS/
  +cd ../..
   
   :3.0.1MYSQL
  -cd POST-RELEASE-3_0_1-SCRIPT
  -if /i "%mode%" == "BUNDLE" mysql -u %un% -p%pw% -D %un% -s -f < POST-3_0_1-KR-2011-01-26-MYSQL.sql
  -if /i "%mode%%InstRice%" == "EMBEDY" mysql -u %Riceun% -p%Ricepw% -D %Riceun% -s -f < POST-3_0_1-KR-2011-01-26-MYSQL.sql
  -move *.log ../LOGS
  -cd ..
  +cd KC-RELEASE-3_1_SP1-SCRIPT
  +mysql -u %un% -p%pw% -D %un% -s -f < KC-Release-3_0_1-3_1_S1-Upgrade-Mysql-Install.sql > KC-Release-3_0_1-3_1_S1-Upgrade-Mysql-Install.log 2>&1
  +
  +if /i "%mode%%InstRice%" == "EMBEDY" goto 3.1.SP1MYSQLRICE
  +if /i "%mode%" == "BUNDLE" goto 3.1.SP1MYSQLRICE
  +goto 3.1.SP1ORACLEFINISH
  +
  +:3.1.SP1MYSQLRICE
  +mysql -u %Riceun% -p%Ricepw% -D %Riceun% -s < KR-Release-3_0_1-3_1_S1-Upgrade-Mysql-Install.sql > KR-Release-3_0_1-3_1_S1-Upgrade-Mysql-Install.log 2>&1
  +mysql -u %Riceun% -p%Ricepw% -D %Riceun% -s < KR-Server-Release-1_0_3-1_0_3_1-Upgrade-Mysql-Install.sql > KR-Server-Release-1_0_3_1-Upgrade-Mysql-Install.log 2>&1
  +
  +:3.1.SP1MYSQLFINISH
  +move *.log ../LOGS
  +cd ..
  +
  +cd KC-RELEASE-3_1_SP2-SCRIPT
  +mysql -u %un% -p%pw% -D %un% -s -f < KC-RELEASE-3_1_SP2-Upgrade-MYSQL.sql > KC-RELEASE-3_1_SP2-Upgrade-MYSQL-Install.log 2>&1
  +
  +if /i "%mode%%InstRice%" == "EMBEDY" goto 3.1.SP2MYSQLRICE
  +if /i "%mode%" == "BUNDLE" goto 3.1.SP2MYSQLRICE
  +goto 3.1.SP2MYSQLFINISH
  +
  +:3.1.SP2MYSQLRICE
  +mysql -u %Riceun% -p%Ricepw% -D %Riceun% -s < KR-RELEASE-3_1_SP2-Upgrade-MYSQL.sql > KR-RELEASE-3_1_SP2-Upgrade-MYSQL-Install.log 2>&1
  +
  +:3.1.SP2ORACLEFINISH
  +move *.log ../LOGS
  +cd ..
  +
  +cd INSTALL-SHARED/MYSQL
  +mysql -u %Riceun% -p%Ricepw% -D %Riceun% -s < KR_CLEAN_SEQ_BS.sql > KR_CLEAN_SEQ_BS-Mysql-Install.log 2>&1
  +move *.log ../../LOGS/
  +cd ../..
   
   goto FINISH
   
  
positive.code: goto dbtype
  
  :Version
  set /p Version="Enter Version (NEW, 2.0, 3.0, 3.0.1) <%Version%>: "
  if /i "%Version%" == "NEW" goto User
  if /i "%Version%" == "2.0" goto User
  if /i "%Version%" == "3.0" goto User
  if /i "%Version%" == "3.0.1" goto User
  echo Invalid Version <%Version%>
  
negative.code: goto usage
  
  :NEWORACLE
  cd KC-RELEASE-3_0-CLEAN/oracle
  if /i "%mode%" == "BUNDLE" (
  sqlplus "%un%"/"%pw%"@"%DBSvrNm%" < oracle_bundled.sql
  )
  if /i "%mode%%InstRice%" == "EMBEDY" (
  sqlplus "%Riceun%"/"%Ricepw%"@"%RiceDBSvrNm%" < oracle_server.sql
  )
  if /i "%mode%" == "EMBED" (
  sqlplus "%un%"/"%pw%"@"%DBSvrNm%" < oracle_client.sql
  )
  move *.log ../../LOGS/
  cd ../..
  
  :3.0ORACLE
  cd KC-RELEASE-3_0_1-SCRIPT
  