谁能帮我编写我想要的批处理文件?
我有一个exe文件。一旦我双击它,就会弹出一个黑色的 DOS 窗口并询问我“文本文件的名称是什么”。我必须输入带有扩展名的全名。按下回车键后,在同一个黑色 DOS 窗口中又出现了一个问题,例如“您的文件中有多少列?1. 10 列;2. 100 列:3. 150 列。此后,exe 文件会再问几个类似的问题。
我想让exe处理多个输入文本文件,只是输入文件的名称和数据不同,但实际上列数和行数等都是一样的。
所以我想也许一个批处理文件可以在批处理模式下运行这个 exe(回答提升的问题)。
bat 文件中的代码可能如下所示:
@echo off
:: Let the exe run and process file1
start C:\Batexe\myprogram.exe
:: Could anyone help with the code to answer following up questions automatically (no need to even display the questions)?
:: Could anyone help with the code to answer following up questions automatically (no need to even display the questions)?
:: Could anyone help with the code to answer following up questions automatically (no need to even display the questions)?
:: Could anyone help with the code to answer following up questions automatically (no need to even display the questions)?
:: Let the exe run and process file2
:: Could anyone help with the code to answer following up questions automatically (no need to even display the questions)?
:: Could anyone help with the code to answer following up questions automatically (no need to even display the questions)?
:: Could anyone help with the code to answer following up questions automatically (no need to even display the questions)?
:: Could anyone help with the code to answer following up questions automatically (no need to even display the questions)?
:: Let the exe run and process file3
.
.
.
我可能有 100 个文本输入文件。上面的代码块我可能会重复 100 次(感觉很蠢)。希望我已经说清楚了。那么有人可以帮助我吗?提前致谢!!!我已经在其他地方发布了相同的问题,但尚未得到答案。