介绍:
提取某天之后编辑过的文件,进行系统增量部署。
脚本为windows平台下的bat文件
lib
node_modules
js\appInfo.js
@echo off
rem xcopy2.BAT transfers all files in all subdirectories of
rem the source drive or directory (%1) to the destination
rem drive or directory (%2)
rem lastModifyTime (%3)
xcopy %1 %2 /s /d:%3 /exclude:EXCLUDE.txt /y
if errorlevel 4 goto lowmemory
if errorlevel 2 goto abort
if errorlevel 0 goto exit
:lowmemory
echo Insufficient memory to copy files or
echo invalid drive or command-line syntax.
goto exit
:abort
echo You pressed CTRL+C to end the copy operation.
goto exit
:exit
pause
@echo off
:start
set "source=F:\yunzhengf\sill"
set "target=C:\Users\Administrator\Desktop\copyFile\"
set startDate=
set /p startDate=请输入指定日期[如06-19]:
if defined startDate (
goto YY
) else (
goto XX
)
:YY
echo 复制 %startDate% 之后的文件
xcopyTime %source% %target% %startDate%-2018
pause&goto start
:XX
set startDate=%date:~5,2%-%date:~8,2%
echo 复制 %startDate% 之后的文件
xcopyTime %source% %target% %startDate%-2018
pause&goto start
pause