@ECHO OFF

IF %1.==. GOTO PRINTHELP

IF %1==copy GOTO DOCOPY

IF %1 == profile GOTO DOPROFILE

IF %1 == delete GOTO DODELETE

IF %1 == job GOTO DOJOB

IF %1 == metadata GOTO DOMETADATA

GOTO PRINTHELP

:DOCOPY
@echo off
setlocal enabledelayedexpansion
call "%~dps0setupcmdline.bat"
set HCPDM_MAINCLASS=com.archivas.clienttools.arcmover.cli.ArcCopy
%JAVA_CMD% %HCPDM_JVMPROPS% -cp "%HCPDM_CP%" %HCPDM_MAINCLASS% %*
GOTO :EXIT0

:DOPROFILE
@echo off
setlocal enabledelayedexpansion
call "%~dps0setupcmdline.bat"
set HCPDM_MAINCLASS=com.archivas.clienttools.arcmover.cli.ArcProfileMgr
%JAVA_CMD% %HCPDM_JVMPROPS% -cp "%HCPDM_CP%" %HCPDM_MAINCLASS% %*
GOTO :EXIT0

:DODELETE
@echo off
setlocal enabledelayedexpansion
call "%~dps0setupcmdline.bat"
set HCPDM_MAINCLASS=com.archivas.clienttools.arcmover.cli.ArcDelete
%JAVA_CMD% %HCPDM_JVMPROPS% -cp "%HCPDM_CP%" %HCPDM_MAINCLASS% %*
GOTO :EXIT0

:DOJOB
@echo off
setlocal enabledelayedexpansion
call "%~dps0setupcmdline.bat"
set HCPDM_MAINCLASS=com.archivas.clienttools.arcmover.cli.ArcJobMgr
%JAVA_CMD% %HCPDM_JVMPROPS% -cp "%HCPDM_CP%" %HCPDM_MAINCLASS% %*
GOTO :EXIT0

:DOMETADATA
@echo off
setlocal enabledelayedexpansion
call "%~dps0setupcmdline.bat"
set HCPDM_MAINCLASS=com.archivas.clienttools.arcmover.cli.ArcMetadata
%JAVA_CMD% %HCPDM_JVMPROPS% -cp "%HCPDM_CP%" %HCPDM_MAINCLASS% %*
GOTO :EXIT0

:PRINTHELP
ECHO. 
ECHO hcpdm copy ^| profile ^| delete ^| job ^| metadata
ECHO.
ECHO For help on individual commands type:
ECHO hcpdm copy ^| profile ^| delete ^| job ^| metadata --help
ECHO.

:EXIT0
