zoukankan      html  css  js  c++  java
  • windows 下项目打包、备份、覆盖、md5check

    工具从网络自行下载,目前我存储在网盘上,可下载后调用

    1. 更新包打包、创建md5,压缩成.zip
    2. 现有项目按日期备份
    3. 覆盖项目并做md5check
      @echo off
      
      rem =================文件变量=============================================
      set zip=D:	ools7za.exe
      set md5=D:	oolsFileCheck_MD5.exe
      
      ::file_package
      cd /d %~pd0
      %md5% -create %~pd0app -k %~pd0appmd5.txt
      %zip% a -tzip %~pd0app.zip %~pd0app -r
      
      ::项目app
      ::判断旧解压包是否存在,存在删除
      ::更新包名:D:server_newapp.zip
      ::解压目录:D:server_newapp
      ::判断更新包是否存在,存在就解压更新包到指定目录
      
      ::file_ready
      if exist "D:server_newapp" (rd /s /q  D:server_newapp) >nul
      if not exist "D:server_newapp.zip" (exit) >nul
      if exist "D:server_newapp.zip" (%zip% x D:server_newapp.zip -oD:server_new) >nul
      
      ::file_backup
      ::exclude log files and/or folders
      echo .log > exclude.txt
      echo log >> exclude.txt
      xcopy /r /d /i /s /y /q /exclude:exclude.txt D:app D:server_bakapp"%date:~0,4%%date:~5,2%%date:~8,2%%time:~0,2%%time:~3,2%"
      del exclude.txt
      
      ::file_update
      ::判断更新目录是否存在,更新目录:D:server_newapp
      ::若存在就将解压文件覆盖到指定目录
      if not exist "D:app" (exit) 
      if not exist "D:server_newapp" (exit)
      xcopy /r /d /i /s /y D:server_newapp D:app
      %md5% -check D:app -k D:server_newappmd5.txt > D:server_newmd5_check.log
      win_tools.bat
    4.  Mysqldump
      set YMDT=%date:~0,4%%date:~5,2%%date:~8,2%%time:~0,2%%time:~3,2%
      mysqldump --opt -u root --password=passwd db > D:dbbakdb_%YMDT%.sql
  • 相关阅读:
    [转载]qemu-kvm安装配置
    Hadoop通过c语言API访问hdfs
    hadoop和hdfs环境搭建
    OpenCV installation for Ubuntu 12.04
    homework-01
    linux命令2
    压缩tar
    anaconda 安装opencv
    anconda安装第三方库
    开源代码
  • 原文地址:https://www.cnblogs.com/Mrhuangrui/p/7137612.html
Copyright © 2011-2022 走看看