Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想知道如何创建一个 bat 文件来执行在特定目录中找到的所有其他 bat 文件?
单程
for %%f in (c:\xxx\*.bat) do ( call %%f )
(要从同一个文件夹运行它,您需要排除正在执行的文件)
if %%f neq %0.bat ( call %%f )
这很简单
希望这有助于导航到您的目录,然后只需编写批处理文件的名称
Abc.bat
cd dirwhereBATCHfileLies batch1 batch2 batch3