0

別のバッチ ファイルから kitchen.bat ファイルを実行する際に問題が発生しています

@echo off
setlocal enableDelayedExpansion 

REM IF EXIST "%ProgramFiles(x86)%\Transform.exe" 
SET Transform="%ProgramFiles(x86)%\Transform.exe"
set tmpDate=%date%
set tmpTime=%time: =0%
set varDate=%tmpDate:~6,4%%tmpDate:~3,2%%tmpDate:~0,2%
set varTime=%tmpTime:~0,2%%tmpTime:~3,2%%tmpTime:~6,2%
set varDateLog=%tmpDate:~0,2%/%tmpDate:~3,2%/%tmpDate:~6,4%
set varTimeLog=%tmpTime:~0,2%:%tmpTime:~3,2%:%tmpTime:~6,2% 
set Traitement=%~n0%~x0
set "varKettleDir=%ProgramFiles(x86)%\PENTAHO_data-integration";%varKettleDir%
set varDir=%HOMEDRIVE%\Temp\advans\bi\cm
set varLog=%varDir%\logBatch
set LOG=%varLog%\AdvansCam_%varDate%_%varTime%.log
set ADV_ETL_CLIENT=%HOMEDRIVE%\SVN\ADV_ETL_CLIENT_REP

REM %Transform% -s:"%~f1" -xsl:"%~dpn0.xsl" 2>NUL

REM ENDLOCAL
REM GOTO:EOF


REM :Syntax
REM 


echo %varDateLog% %tmpTime:~0,2%:%tmpTime:~3,2%:%tmpTime:~6,2% ^| ... Erreur : Le paramètre Date arreté n'est pas présent >> %LOG%
echo %varLog%\Advans_CamInit%~x0^| Debut du traitement >> %LOG%
echo ~x0=%~x0 >> %LOG%
echo ~x=%~n0%~x0 >> %LOG%
rem -- PENTAHO DATA INTEGRATION
REM set varPentaho= "%varKettleDir%\kitchen.bat /file:%ADV_ETL_CLIENT%\J_STG_push.kjb /level:Basic > %varLog%\JobCamClient_%varDate%_%varTime%.log"
REM call %varPentaho% && echo %varPentaho% "OK" || echo %varPentaho%"NOK" >> %LOG%
REM echo Debut du traitement >> %LOG%
cmd kitchen.bat /file:%ADV_ETL_CLIENT%\J_STG_push.kjb /level:Basic > %varLog%\JobCamClient_%varDate%_%varTime%.log" && echo "OK" || echo "NOK" >> %LOG%
4

1 に答える 1

1

この行で試してください:

call  kitchen.bat /file:%ADV_ETL_CLIENT%\J_STG_push.kjb /level:Basic > %varLog%\JobCamClient_%varDate%_%varTime%.log"  && (
  echo "OK">>%LOG%
) || (
  echo "NOK" >> %LOG%
)

あなたの最後のものの代わりに。

于 2015-05-04T22:00:54.933 に答える