set source=%1
set cible=%2
set mode=%3
set d_log=%4
echo %source%
echo %cible%
echo %mode%
for /F « tokens=1-4 delims=/ » %%a in (‘echo %date:~4,10%’) do set w_date=%%c%%a%%b
for /F « tokens=1-4 delims=: » %%a in (‘echo %time:~0,8%’) do set w_time=%%a%%b%%c
set horo=%w_date%_%w_time%
set f_log=%d_log%\%w_date%_%w_time%_%TOM_JOB%.log
echo robocopy %source% %cible% /%mode% /w:10 /r:2 /LOG+:%f_log%
robocopy %source% %cible% /%mode% /w:10 /r:2 /LOG+:%f_log%
set err=%errorlevel%
type %f_log%
exit /B %err%