bat批处理脚本学习系列(一)

一键工作.bat

 

@ECHO OFF
title "一键工作"

:: 一键启动:谷歌浏览器、IDEA、HBuilderX、微信、微信开发者工具、QQ、Redis、Redis管理工具、Navicat、PowerDesign
start /min "" "C:\Users\Tosea\AppData\Local\Google\Chrome\Application\chrome.exe"
start /min "" "D:\App\IntelliJ IDEA 2019.1\bin\idea64.exe"
start /min "" "D:\App\HBuilderX\HBuilderX.exe"
start /min "" "D:\App\微信web开发者工具\微信开发者工具.exe"
start /min "" "D:\App\Redis-x64-3.2.100\redis-server.exe"
start /min "" "D:\App\RedisDesktopManager\rdm.exe"
start /min "" "D:\App\PowerDesigner 16\PdShell16.exe" "D:\Workspace\ZhhyWorkspace\citylife-system\doc\model\citylife.v1.0.4.pdm"
start /min "" "D:\Common\WeChat\WeChat.exe"
start /min "" "D:\Common\QQ\Bin\QQScLauncher.exe"
start /min "" "D:\Common\Navicat Premium 12\navicat.exe"

 

 

echo on
echo "欢迎来到脚本之家!"
echo "2"
pause

@echo on
echo '11111'
echo "2"
pause

@echo off
echo "adasd"
echo "2"
pause

  

go1.bat

@echo off
cd "E:\work object\wxobj\marketingcenterweb"
cd /d E:
npm run build

  

 

go2.bat

rd /s/q "E:\work object\wxobj\marketingcenterweb-release\css"
rd /s/q "E:\work object\wxobj\marketingcenterweb-release\fonts"
rd /s/q "E:\work object\wxobj\marketingcenterweb-release\img"
rd /s/q "E:\work object\wxobj\marketingcenterweb-release\js"
del /s/q "E:\work object\wxobj\marketingcenterweb-release\index.html"

xcopy /s "E:\work object\wxobj\marketingcenterweb\dist"\*.* "E:\work object\wxobj\marketingcenterweb-release"

  

 

go3.bat

@echo off
echo “开始git”
cd "E:\work object\wxobj\marketingcenterweb-release"
cd /d E:
git add .
git commit -am "测试批处理git上传"
git push origin master
git checkout recharge-release
git pull origin master
git commit -am "commit recharge-release"
git push origin recharge-release

pause

  

 

 

提交代码.bat

call C:\Users\zenghuan\Desktop\go1.bat
call C:\Users\zenghuan\Desktop\go2.bat
call C:\Users\zenghuan\Desktop\go3.bat

 

posted @ 2021-05-29 12:04  haveProgress  阅读(96)  评论(0编辑  收藏  举报