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.
我是新手,但我试图制作一个批处理文件,将可执行文件的名称复制到特定位置,创建一个新文件夹,将其命名为 file ,复制该文件夹中的可执行文件并运行它。
我把这一切都解决了,但我有多个 .exe 文件,我想知道如何为该位置的所有文件执行所有这些迭代
您可以使用for迭代文件:
for
for %%F in (*.exe) do ( mkdir "C:\Foo\%%~nF" copy "%%F" "C:\Foo\%%~nF" "C:\Foo\%%F" )