【问题标题】:Batch command to find and run file批处理命令查找和运行文件
【发布时间】:2013-06-21 02:53:38
【问题描述】:

简单的批处理命令行从 C: 驱动器中查找 textfile.txt 并运行它。 试图找到一个但没有看到任何地方,所以这就是我在这里问它的原因。 那么,有什么想法吗?

【问题讨论】:

    标签: for-loop batch-file window cmd directory


    【解决方案1】:

    试试这个:

    for /f "delims=" %%i in ('dir /b /a-d /s c:\textfile.txt') do "%%~fi"
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-09-08
      • 2010-11-29
      • 2022-01-05
      • 1970-01-01
      相关资源
      最近更新 更多