# 文件批量改名
@echo off
set a=1
setlocal EnableDelayedExpansion
for %%n in (*.doc) do (
ren "%%n" "20200222-%%n"
)
1
2
3
4
5
6
7
8
9
10
11
2
3
4
5
6
7
8
9
10
11
# 一次性打开指定应用程序
@echo off
call "D:\Program Files\Foxmail 7.2\Foxmail.exe"
call "D:\Program Files (x86)\Tencent\QQ\Bin\QQScLauncher.exe"
call "D:\Program Files (x86)\Tencent\WeChat\WeChat.exe"
start "D:\Program Files\Mozilla Firefox\firefox.exe" http://blog.csdn.net/weekdawn
1
2
3
4
5
2
3
4
5
# nginx简化操作
@echo off
chcp 65001
choice /c kcg /m 你想对nginx做什么?(k开启/c重启/g关闭)
if errorlevel 3 goto :close
if errorlevel 2 goto :reload
if errorlevel 1 goto :start
:close
D:
cd D:\nginx-1.12.2
nginx.exe -s stop
:reload
D:
cd D:\nginx-1.12.2
nginx.exe -s reload
:start
D:
cd D:\nginx-1.12.2
start nginx.exe
echo 操作成功!
pause
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# 删除dist生成目录
chcp 65001
@echo off
rmdir /s E:\files\project\webapps\dist
echo 删除dist成功
pause
1
2
3
4
5
2
3
4
5