1.代码如下
SET NowDate=%date:~10,4%%date:~4,2%%date:~7,2% REM SET NowDate=%date:~3,4%%date:~8,2%%date:~11,2% SET NowTime=%time:~0,2%%time:~3,2%%time:~6,2% SET DirToBackup=%NowDate%\V-%NowDate%-%NowTime% REM ECHO %Dir% MKDIR %DirToBackup% xcopy /I /E /K /V /EXCLUDE:xcopy-excluding.txt C:\Working\Projects\publishs\IIS %DirToBackup% PAUSE
1.1.C:\Working\Projects\publishs\IIS: 需要备份文件夹的路径
1.2.xcopy-excluding.txt: 不需要复制文件名单
2.xcopy-excluding.txt
\Outputs\
\Web.config