@call "%~dp0config.bat" 0 > nul if [%1]==[] ( echo Aufruf: call transformer.bat Modell[.pyi] [Anz] echo. echo Anz Anzahl der Wiederholungen goto :eof ) :setup set MODELL=%~n1 if [%2]==[] ( set /a MAX=2 ) else ( set /a MAX=%2+0 ) set ANZAHL=0 set CUBE= call teste_verzeichnis.bat %COGNOS% & if errorlevel 42 goto :eof call teste_verzeichnis.bat %PORTAL%\System\Models\%MODELL%.pyi & if errorlevel 42 goto :eof for /F "usebackq delims=" %%i in (`cubename.bat %MODELL%`) do set CUBE=%%i>nul echo. echo == Modell "%MODELL%" == :loop if [%CUBE%]==[""] ( call unlocker.bat %PORTAL%\System\Models\%MODELL%.pyi rem taskkill.exe /F /IM trnsfrmr.exe 2> nul taskkill.exe /F /IM autoexe.exe 2> nul sleep 10 for /F "usebackq delims=" %%i in (`cubename.bat %MODELL%`) do set CUBE=%%i>nul ) if [%CUBE%]==[""] goto error :cubefile set CUBE_TEMP="%PORTAL:~1,-1%\System\Cube_out\tasks\%CUBE:~1,-1%.mdc" set CUBE_FILE="%PORTAL:~1,-1%\System\Cube_out\%CUBE:~1,-1%.mdc" :duration %PHP%\php Tools\run.php transformer duration %TASKS%\logs\%MODELL%.log echo. set /a ANZAHL=%ANZAHL%+1 if [%MAX%]==[0] ( echo Erstelle Kopie, ohne Original zu ersetzen ) else ( echo Aufruf %ANZAHL% von max. %MAX% ) call unlocker.bat %CUBE_TEMP% del /F /S /Q %PORTAL%\System\temp\ 1> nul 2> nul :create echo * Erstelle Cube %CUBE% %PHP%\php Tools\run.php transformer create %PORTAL%\System\Models\%MODELL%.pyi if errorlevel 110 goto error if [%MAX%]==[0] ( echo Cube %CUBE% in Kopie erstellt. goto end ) if exist %CUBE_TEMP% goto replace echo Neue Cube-Datei nicht gefunden. :error echo !! FEHLER bei der Erstellung !! if %ANZAHL% geq %MAX% ( echo Cube %CUBE% zurueckgesetzt. goto end2 ) :retry move /Y %PROT%\%MODELL%.log %TASKS%\logs\%MODELL%.%ANZAHL%.log 1> nul 2> nul echo Warte 60 Sekunden... sleep 60 goto loop :replace call unlocker.bat %CUBE_FILE% del /F /Q %CUBE_FILE% 1> nul 2> nul if exist %CUBE_FILE% ( taskkill.exe /F /IM pwrplay.exe 2> nul del /F /Q %CUBE_FILE% 1> nul 2> nul ) if exist %CUBE_FILE% ( echo !! Alte Cube-Datei kann nicht geloescht werden !! goto end2 ) move /Y %CUBE_TEMP% %CUBE_FILE% 1> nul 2> nul && echo * Alte Cube-Datei %CUBE% ersetzt. :end echo Fertiggestellt: %TIME:~0,5% :end2 copy /Y %PROT%\%MODELL%.log %TASKS%\logs\%MODELL%.log 1> nul 2> nul echo.