frp_mov.bat

cls
echo === Transfert Robocopy ===
set w_fic=%1
set w_source=%2
set w_cible1=%3
set w_cible2=%4
set w_log=%5\%TOM_JOB%.log
echo fic : %w_fic%
echo source : %w_source%
echo cible1 : %w_cible1%
echo cible2 : %w_cible2%
echo log : %w_log%
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 w_horo=%w_date%_%w_time%
echo w_horo : %w_horo%
TIMEOUT /T 3 /NOBREAK >nul
echo Copy
echo robocopy %w_source% %w_cible1% /S /w:10 /r:2 /LOG+:%w_log%
robocopy %w_source% %w_cible1% /S /w:10 /r:2 /LOG+:%w_log%
TIMEOUT /T 3 /NOBREAK >nul
echo Rename 
echo ren %w_source%%w_fic% %w_fic%.%w_horo%
ren %w_source%%w_fic% %w_fic%.%w_horo%
echo robocopy %w_source% %w_cible2% /S /w:10 /r:2 /LOG+:%w_log%
robocopy %w_source% %w_cible2% /MOV /w:10 /r:2 /LOG+:%w_log%

Laisser un commentaire

Votre adresse de messagerie ne sera pas publiée. Les champs obligatoires sont indiqués avec *