如何通过文件传递参数到tortoiseproc.exe? [英] how to pass parameters to tortoiseproc.exe via file?

查看:1463
本文介绍了如何通过文件传递参数到tortoiseproc.exe?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆