BAT file:
@for /F “tokens=1,2,3 delims=- “”” %%i in (“%date%”) do @set shortdate=%%i%%j%%k
@for /l %%i in (1,1,100) do @(
@if NOT exist src%shortdate%-%%i.zip @(
@if NOT exist src%shortdate%-%%i.rar @(
@zip -9 -r src%shortdate%-%%i.zip Comm Sender -x *.exe *.~* *ModelSupport* *_history* *.dcu
@echo Zipped into src%shortdate%-%%i.zip
@goto END
)
)
)
:END
用这个脚本来自动压缩源代码~ 比手动压缩方便许多…