jewish dragon
Alea jacta est. Юлий Цезарь 44 г. до н.э. (Жребий брошен)


@echo on
@rem chcp 866
@CLS
@COLOR A
title ArmAdm
@call :DATA
@rem folderw="____"
@Set DIR_PATH=%~dp0
@Set logDelete=0
@Set LOG="%~dp0%~n0.log"
@rem Откуда копируем
@rem subst x: /d
@rem subst x: %folderw%
@set DD="____________"
@set Di="_______________"
@rem Куда копируем
@set DS="_____________"
@set DD1="_______________"
@rem Типы файлов
@Set maskfiles=*.bak
@if "%logDelete%" == "1" (
@if exist "%log%" (
@del "%log%" /Q
)
)
call :DATA
@if exist "%DS%\%maskfiles%" (
@echo Date: %date%,Time: %mh% start >> %log%
@for %%f in (%DS%\%maskfiles%) do (
call XCOPY %%f %DS% /Y /M
forfiles /p "%DS1%" /s /m *.* /c "cmd /c Del @path /q" /d -5
@echo %%~nxf >>%log%
)
)
@if exist "%DD%\%maskfiles%" (
@echo Date: %date%,Time: %mh% Cписок %maskfiles% >> %log%
@for %%f in (%DD%\%maskfiles%) do (
call XCOPY %%f %DD1% /Y /M
forfiles /p "%DD1%" /s /m *.* /c "cmd /c Del @path /q" /d -5
@echo %%~nxf >>%log%
)
)
@rem subst x: /d
@echo Date: %date%,Time: %mh% End >> %log%
exit /b
:data
set tempdate=%date:~-10%
set YYYY=%DATE:~-4%
set YY=%date:~8,2%
set MM=%DATE:~3,2%
set DD=%DATE:~0,2%
set ms=%TIME:~-2%
set ss=%TIME:~6,2%
set mh=%TIME:~0,8%
set mn=%TIME:~3,2%
exit /b

@темы: IT