如何在多个文件夹上运行可执行文件? [英] How do you run an executable on multiple folders?

查看:146
本文介绍了如何在多个文件夹上运行可执行文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


  • 我需要在多个文件夹上运行一个可执行文件。假设
    EXECUTABLE称为 example.exe。

  • 该文件夹组是使用20140101-20141231方案的DATED子目录。注明日期的子目录的一年。总共365个文件夹。

  • 我通常运行以下命令: d:\FOLDER1\FOLDER2\EXECUTABLES\example.exe / DATE 20140101

  • I need to run an executable on multiple folders. Lets say the EXECUTABLE is called "example.exe".
  • The group of folders are DATED sub-directories that use a scheme of 20140101-20141231. A year of dated sub-directories. 365 Folders in total.
  • I usually run the command like: d:\FOLDER1\FOLDER2\EXECUTABLES\example.exe /DATE 20140101

此方法的问题是我只能在一个带日期的子目录上运行此可执行文件或文件夹一次...任何帮助将不胜感激!谢谢!

The problem w/ this method is that I am ONLY able to run this executable on ONE dated sub-directory or folder at a time...any help would be appreciated! Thanks!

推荐答案

直接在提示符后

for /d %a in (d:\your\subdirectory\2014*) do d:\FOLDER1\FOLDER2\EXECUTABLES\example.exe /DATE %%~na

for /d %a in (d:\your\subdirectory\2014*) do call d:\FOLDER1\FOLDER2\EXECUTABLES\example.exe /DATE %%~na

for /d %a in (d:\your\subdirectory\2014*) do start /w "" d:\FOLDER1\FOLDER2\EXECUTABLES\example.exe /DATE %%~na

可能适合。

(我假设您希望 / date 开关后面的参数为目录名; 2014 * 还要假设您希望它在所有以 2014 开头的目录上运行。)

(I've assumed you want the parameter following the /date switch to be the name of the directory; also 2014* assumes you want this to run on all directories named starting 2014.)

这篇关于如何在多个文件夹上运行可执行文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆