可使用如下形式判断文件中是否包含指定字符串,包含则ERRORLEVEL为0,否者为1,然后通过goto在指定条件下跳过某些流程

find /I "_str" "test.txt" >nul

if %ERRORLEVEL% EQU 1 goto WAIT1

rem 文件中不包含_str则为1,此时重命名

ren  "tools\help\*.jar"  tools\help\*_postfix.jar"

:WAIT1

相关文章:

  • 2022-12-23
  • 2022-01-09
  • 2022-12-23
  • 2022-01-25
  • 2021-05-25
  • 2021-10-15
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-05-23
  • 2022-12-23
  • 2021-06-11
相关资源
相似解决方案