批处理文件 - 使用更改的参数多次运行程序 [英] Batch file-Run program multiple times with changed parameters
问题描述
大家好。
我需要创建一个批处理文件,用文件名作为patameter启动程序。完成后,我想在具有相同名称的文件上再次激活程序,但是在目录中的下一个文件夹中。
例如参数文件名是test.xml,我在3个单独的文件夹中有3个这样的文件。程序名称是prog.exe它看起来应该是这样的:
prog.exe c:\ test \\\\ test.xml
然后.. 。
prog.exe c:\ test \\\\ test.xml
等
此外,我必须知道吗目录中的文件夹数量,或者有一种方法可以在目录中的所有文件夹上激活它?
感谢您的建议和时间
dj4400
Hi all.
I need to create a batch file that starts a program with a file name as a patameter. After it finishes, i want to activate the program again on a file with the same name but in the next folder in the directory.
For example the parameter file name is test.xml, and i have 3 such files in 3 separate folders. The program name is prog.exe it should look something like that:
prog.exe c:\test\1\test.xml
And then...
prog.exe c:\test\2\test.xml
etc.
Also, Do i have to know the number of folders in the directory or there's a way to activate it on all the folders in a directory?
Thanks for your advice and time
dj4400
推荐答案
类似:
Something like:
for /d %x in (*) do echo prog.exe %x\test.xml
这篇关于批处理文件 - 使用更改的参数多次运行程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!