显示空行,blank line
echo.
ref:
https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/echo
命令是否回显
@, 当前命令不回显
@echo on,打开回显
@echo off,关闭回显
@copy a.txt b.txt
copy a.txt b.txt
@echo off
copy a.txt b.txt
@echo on
copy a.txt b.txt
条件语句
set mode=all
if %mode%==all (
echo mode is all
) else if %mode%==single (
echo mode is single
) else (
echo none
)
ref:
https://www.cnblogs.com/xiongzaiqiren/p/11364452.html
延时变量概念
https://www.cnblogs.com/habibah-chang/p/3532125.html
是否存在文件夹
if exist apkDir (
echo exist apkDir
) else (
echo mkdir apkDir
mkdir apkDir
)
读取文件
for /f "delims=" %%i in (%text_file%) do set var_line=%%i
超级好文ref:
https://devblogs.microsoft.com/oldnewthing/20120731-00/?p=7003
查看使用方法
在command窗口中 /?
set /?
if /?
for /?
mkdir /?
网友评论