Batch file to automatically pack source

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

用这个脚本来自动压缩源代码~ 比原来方便多了~

Old Blog Link: http://computer.mblogger.cn/henryhu/posts/62095.aspx

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.