@Echo off
rem -----------------------------------------------------------------------------------------
rem Description: copy JobMgr Application Icons from:JobMgr_ResIcons_S_DP to:JobMgr_ResIcons_L_DP
rem #New: 24.03.2021/J.Fes
rem #LUp: 05.08.2022/J.Fes add ropcopy parameter /A-:R removes write protection in target
rem #LUp: 10.03.2023/J.Fes add JobMgr_ResIcons_DP
rem
rem #Doc: Optionsparameter: Result ENV:JobMgr_ResIcons_DP points to used JobMgr Icons

setlocal
 set CmdCurRoot$DP=%~dp0
 set CmdCurRoot$DP=%CmdCurRoot$DP:~0,-1%
 set JobMgr_ResIcons_L_DP=%ProgramData%\JobManager_V3\Icons
 set JobMgr_ResIcons_S_DP=%CmdCurRoot$DP%\Icons
 Call robocopy "%JobMgr_ResIcons_S_DP%" "%JobMgr_ResIcons_L_DP%" /A-:R /r:3 /w:1 /TBD /NP /NJH /NJS /NDL 1>nul 2>>nul
endlocal& set JobMgr_ResIcons_S_DP=%JobMgr_ResIcons_S_DP%&set JobMgr_ResIcons_L_DP=%JobMgr_ResIcons_L_DP%

 set JobMgr_ResIcons_DP=%JobMgr_ResIcons_S_DP%
 if exist "%JobMgr_ResIcons_L_DP%" set JobMgr_ResIcons_DP=%JobMgr_ResIcons_L_DP%

goto :eof
