Цитата NikolayHAOS:
Мобыть кто покритикует? »
|
Ну, тут не критика даже, я бы сказал — некоторая оптимизация, наподобие того, что я предлагал выше.
Скрытый текст
Код:
@echo off
setlocal enableextensions enabledelayedexpansion
set sSourceRoot=C:\111
set sDestRoot=\\Kanevserver44\Individual\Sekretary\mirror
if exist "%sSourceRoot%\." (
if exist "%sDestRoot%\." (
for %%i in ("221" "222" "223" "224" "225") do (
if exist "%sSourceRoot%\%%~i\." (
if exist "%sDestRoot%\%%~i\." (
robocopy.exe "%sSourceRoot%\%%~i" "%sDestRoot%\%%~i" /MIR /Z /R:2 /W:5 /NP /LOG+:disk_d.log
) else (
echo Can't find destination folder [%sDestRoot%\%%~i].
)
) else (
echo Can't find source folder [%sSourceRoot%\%%~i].
)
)
) else (
echo Can't find destination root folder [%sDestRoot%].
exit /b 2
)
) else (
echo Can't find source root folder [%sSourceRoot%].
exit /b 1
)
endlocal
exit /b 0