如何通过文件传递参数到tortoiseproc.exe? [英] how to pass parameters to tortoiseproc.exe via file?
问题描述
我使用Runtime.getRuntime.exec()从java以编程方式生成要提交到cmd.exe的命令。
I am programmatically generating a command to be submitted to cmd.exe using Runtime.getRuntime.exec() from java.
命令是tortoiseproc ignore命令form
The command is tortoiseproc ignore command of the form
tortoiseproc /command:ignore /path:file1*file2*file3*...................filen
如您所见,path参数需要一个数字文件和问题发生时,此字符串超过一定长度约。 8197个字符,如cmd.exe的微软KB中所述。
As you can see, the path parameter takes a number of files and problem occurs when this string exceeds a certain length approx. 8197 characters as documented in microsoft KB for cmd.exe.
解决方法是修改程序,使其从文件接受参数,而不是从命令行字符串。有人知道如何传递参数到tortoiseproc.exe通过文件?
The workaround there says that modify the program so that it accepts the parameters from a file rather than from the commandline string. Does anybody know how to pass parameters to tortoiseproc.exe via file?
推荐答案
你可以传递一个文件utf16格式,
you can pass a file in utf16 format, with each file listed on a separate line.
使用 / pathfile:path / to / file.txt将路径传递到该文件
这篇关于如何通过文件传递参数到tortoiseproc.exe?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!