beautypg.com

HP XP P9500 Storage User Manual

Page 83

background image

SET /a CNT_DL=0
:DL_RETRY
REM ####################################### Download %CNT_DL%
SET /a CNT_DL=%CNT_DL% + 1
%RAIDINF_PATH%\raidinf download report -servername %SERVER% ^
-report %REPORT_NAME% -targetfolder %TARGETFOLDER%
if ERRORLEVEL 1 (
IF %CNT_DL% GTR %LOOP% GOTO :ABEND
CALL :SLEEP
GOTO :DL_RETRY
)

REM ####################################### Create Error Check
IF EXIST %REPORTFOLDER%\Report_%REPORT_NAME%_1.tgz (
IF EXIST %TARGETFOLDER%\Report_%REPORT_NAME%.tgz (
GOTO :FC_CHECK
) else (
GOTO :CHECK_END
)
) else (
GOTO :CHECK_END
)

:FC_CHECK
FC /B %REPORTFOLDER%\Report_%REPORT_NAME%_1.tgz ^
%TARGETFOLDER%\Report_%REPORT_NAME%.tgz > NUL
if ERRORLEVEL 1 (
REM
) else (
DEL %TARGETFOLDER%\Report_%REPORT_NAME%.tgz
GOTO :END
)

:CHECK_END
REM ####################################### Migrate Reports
IF EXIST %TARGETFOLDER%\Report_%REPORT_NAME%.tgz (
IF EXIST %REPORTFOLDER%\Report_%REPORT_NAME%_2.tgz (
COPY %REPORTFOLDER%\Report_%REPORT_NAME%_2.tgz ^
%REPORTFOLDER%\Report_%REPORT_NAME%_3.tgz
)
IF EXIST %REPORTFOLDER%\Report_%REPORT_NAME%_1.tgz (
COPY %REPORTFOLDER%\Report_%REPORT_NAME%_1.tgz ^
%REPORTFOLDER%\Report_%REPORT_NAME%_2.tgz
)
IF EXIST %TARGETFOLDER%\Report_%REPORT_NAME%.tgz (
COPY %TARGETFOLDER%\Report_%REPORT_NAME%.tgz ^
%REPORTFOLDER%\Report_%REPORT_NAME%_1.tgz
DEL %TARGETFOLDER%\Report_%REPORT_NAME%.tgz
)
)
GOTO :END
EXIT /B

:SLEEP
REM ####################################### SLEEP with %TIMEOUT%
ping 127.0.0.1 -n %TIMEOUT% > NUL
EXIT /B

:ABEND
REM ####################################### ABEND
ECHO "Download Report Script was ABEND"

:END

Managing tasks

83

This manual is related to the following products: