使用其他目录中的文件在bat文件中运行exe文件

时间:2022-03-17 06:28:29

I am trying to run .exe file, which uses another not executable files from different directories. From command line it works fine. Could You please help me to find out the syntax how can i make a bat file, which will do it.

我正在尝试运行.exe文件,它使用来自不同目录的另一个不可执行文件。从命令行,它工作正常。你能不能帮我找出语法怎样才能制作一个bat文件,哪个会这样做。

Here is the path, that i ran from command line: C:\Program Files\Test\bin\run.exe -TestPath D:\test1\ -TestPath httpDownloader.lrs D:\test1\Temp -ResultLocation -ResultCleanName Res1 -Run"

这是我从命令行运行的路径:C:\ Program Files \ Test \ bin \ run.exe -TestPath D:\ test1 \ -TestPath httpDownloader.lrs D:\ test1 \ Temp -ResultLocation -ResultCleanName Res1 -Run “

Thanks in advance

提前致谢

1 个解决方案

#1


0  

bat file uses comand line syntax so if it works in cmd it should work in .bat

bat文件使用命令行语法,因此如果它在cmd中工作,它应该在.bat中工作

"C:\Program Files\Test\bin\run.exe" -TestPath D:\test1\ -TestPath httpDownloader.lrs D:\test1\Temp -ResultLocation -ResultCleanName Res1 -Run

Only thing you have to be careful about are spaces in file path!

唯一需要注意的是文件路径中的空格!

#1


0  

bat file uses comand line syntax so if it works in cmd it should work in .bat

bat文件使用命令行语法,因此如果它在cmd中工作,它应该在.bat中工作

"C:\Program Files\Test\bin\run.exe" -TestPath D:\test1\ -TestPath httpDownloader.lrs D:\test1\Temp -ResultLocation -ResultCleanName Res1 -Run

Only thing you have to be careful about are spaces in file path!

唯一需要注意的是文件路径中的空格!