|
本帖最后由 dos时代菜鸟 于 2021-3-22 22:53 编辑
类似这样的,自己参考
- @echo off
- setlocal ENABLEDELAYEDEXPANSION
- set arg1=123
- set arg2=234.ini
- set arg3=456
- set arg4=789
- for %%c in (c d e f g h i j k l m n o p q r s t u v w x y z) do (
- if exist %%c:\ (
- for /f "delims=" %%d in ('dir /ad /b %%c:\*!arg1!* 2^>nul') do (
- if exist %%c:\%%d\!arg2! (
- find /i "!arg3!" "%%c:\%%d\!arg2!" >nul
- if not errorlevel 1 (
- for /f "delims=" %%i in ('dir /b /a-d %%c:\%%d\*!arg4!*.exe') do (
- echo 此处运行 "%%c:\%%d\%%i"
- )
- )
- )
- )
- )
- )
- pause
复制代码 |
|