批处理打包文件例子
来源:互联网 发布:淘宝开店找货源怎么找 编辑:程序博客网 时间:2024/05/22 10:58
@echo on:release11 debugset curver=taiwan32set curbag=release11:取得当前时间 set curyear=%date:~0,4%set curmon=%date:~5,2%set curday=%date:~8,2%:首先看下时间中小时是否小于10if "%time:~0,2%" lss "10" (set thisTime=0%time:~1,1%%time:~3,2%%time:~6,2%) else (set thisTime=%time:~0,2%%time:~3,2%%time:~6,2%):@pause:打包后的名字set bagname=%curver%_%curyear%%curmon%%curday%_%thistime%.rar:@pause:临时目录set tmppath=d:\tmp:压缩文件要拷贝到的地方set despath=e:\aaa:当前的路径set curpath=%CD%cd %curpath%:临时目录if exist %tmppath% rmdir /s /q %tmppath%mkdir %tmppath%mkdir %tmppath%\%curbag%:@pause:拷贝文件到临时目录xcopy /s %curpath%\%curbag% %tmppath%\%curbag%:删除之前的rardel /s /q %curpath%\*.rard:cd %tmppath%\%curbag%:删除所有svnfor /d /r . %%i in (.svn) do (rd /s /q %%i):删除临时文件del /s /q *.ilkdel /s /q *.pdbcd logdel /s /q *.logdel /s /q %tmppath%\%curbag%\updateDataBase\log\*.*del /s /q %tmppath%\%curbag%\updateDataBase\backupDataBase\*.*del /s /q %tmppath%\%curbag%\updateDataBase\clearTestData.sqldel /s /q %tmppath%\%curbag%\updateDataBase\updateAccount.sqldel /s /q %tmppath%\%curbag%\updateDataBase\updateLog.sqldel /s /q %tmppath%\%curbag%\updateDataBase\updateTestData.sqlcd ..:打包命令set rarpath="C:\Program Files\WinRAR\Rar.exe":e:cd %tmppath%\%curbag%:@pause:把文件打包放到上一层目录中去%rarpath% a -r -k -s -m3 %curpath%\%bagname% ..:把文件拷贝到目标目录中去del /s /q %despath%\*.*xcopy %curpath%\%bagname% %despath%e:cd %curpath%
最重要的是这句代码
%rarpath% a -r -k -s -m3 %curpath%\%bagname% ..即打包代码
0 0
- 批处理打包文件例子
- 文件压缩打包 批处理
- 批处理bat文件若干例子
- 打包Jar文件(例子)
- 批处理例子
- webstart 打包批处理
- 数据库打包批处理
- 打包和批处理
- android打包批处理
- cx_Freez打包Python批处理
- 自动打包批处理
- 几个批处理例子
- 批处理的应用例子
- 文件批处理
- maven打包jar与pom文件到本地仓库例子
- PyQt简单例子: 包括ui文件生成, 代码, 打包exe
- 自制批处理使用Yui Compressor压缩并打包js或css文件
- fat jar 解决webservice客户端打包jar文件 bat批处理运行
- ghost文件与ISO文件
- svn: generic failure 错误解决方法
- C++ 关键段(Critical Section)CS 案例解析(八)
- 设计模式---组成
- 写给系统管理员的 25 个 PHP 安全实践
- 批处理打包文件例子
- 车灯闪烁检测——停在里面检测问题的一些想法
- ios 导航栏放置多个按钮
- foolscap实现rpc(二)
- pragma pack,字节对齐
- android textview 自动连接网址及修改默认点击事件
- Android Monkey Test
- pthread_create 传递参数时指针跑飞问题
- PHP学习笔记2