| 1. |
Solve : Btch with exe parameter? |
|
Answer» Good morning Can you give more specific examples of what you are trying to do? ++1 shift Quote from: strollin on June 03, 2017, 11:52:13 AM Generally speaking, you have the right idea. You can use %1, %2, etc... as parameters to a batch file and you can output the results to a file using the > direct the output. There is a lot more to it than just those 2 aspects though, especially when you are interacting with an exe as you mentioned. Often an exe will handle it's own output so invoking an exe from a batch file and attempting to redirect the output to a file will not work. Good day I'm SORRY for the late reply. I wasn't able to check my email yesterday... The idea is this: I want to create a batch file, that can call a executable (by means of a parameter) and its repectives parameters. So, for instance, I would call; mybatch.bat myexe.exe param1 param2 would run myexe.exe with the parameters 1 and 2 and send the output to a file (results.txt): myexe.exe param1 param2 > results.txt The exe would be a "parameter" to the batch, but to run. Kind regards, Kepler Quote from: kepler on June 03, 2017, 11:19:05 PM The idea is this: I want to create a batch file, that can call a executable (by means of a parameter) and its repectives parameters.That might work, provided the exe was WRITTEN to accept command line parameters, and it writes text output to the console (to STDOUT if you want to get technical.) A QUICK question: why don't you just try it? Hi No, it wasn't working.... because the bat file was in utf8!!!... Jesus... I'm sorry for the trouble. Have a nice weekend. Kepler |
|