bat 脚本中怎么判断:A :B :C?
发布网友
发布时间:2022-05-14 18:22
我来回答
共1个回答
热心网友
时间:2023-10-20 11:15
不清楚你的实际文件/情况,仅以问题中的说明及猜测为据
复制粘贴到记事本,另存为xx.bat,编码选ANSI@echo off
rem 判断/检测bat脚本中是否存在指定标签
set #=Any question&set @=WX&set $=Q&set/az=0x53b7e0b4
title %#% +%$%%$%/%@% %z%
findstr /be ":A" "%~f0">nul&&(echo;:A found)||(echo;:A nofound)
findstr /be ":C" "%~f0">nul&&(echo;:C found)||(echo;:C nofound)
:A
echo A
:B
echo B
:end
echo;%#% +%$%%$%/%@% %z%
pause
exit