如何绕过命令行长度的限制? [英] How to get around the command line length limit?
问题描述
我一直工作在一个小而简单的程序,我将文件拖放,并根据certian规则,他们被转移到不同势的地方。
程序除非我的降幅超过了一些文件的详细工作正常,那么它踢回一个错误(这似乎是比什么都重要Windows)中的启动命令C:\myapp.exe \file \file \file太长。
我知道我可以成立一个背景proccess,但我真的希望这个节目不是在底色上运行(其中,这将是闲置的大部分的时间)。
有没有解决这个限制?
对于降外壳扩展名处理的程序将获得的全部信息所有丢弃的文件和你不必开始的所有文件像参数命令子程序。
I've been working on a small and simple program that I drop files onto and, based on certian rules, they are moved to diffrent places.
The program works fine unless I drop more than a few files, then it kicks back an error (that appears to be more Windows than anything) that the start up command "c:\myapp.exe \file \file \file" is too long.
I realize I could set up a background proccess, but I really would prefer that this program not run in the backround (where it would be idle most of the time).
Is there a way around this limitation?
If you want to drop files with respect of Windows Explorer, than you can implement your own Drop Handlers as a Shell Extension Handlers (see http://msdn.microsoft.com/en-us/library/cc144165(VS.85).aspx and http://msdn.microsoft.com/en-us/library/bb776797.aspx). On http://www.codeproject.com/kb/shell/shellextguideindex.aspx you will find a good introduction how to write such extensions. The part VI (see http://www.codeproject.com/kb/shell/ShellExtGuide6.aspx) gives an example of Drop Handler (for a little other use case, but it dose not matter).
With respect of Drop Shell Extension Handler your program will receive full information about all dropped files and you need not start a child program with all the files as command like parameters.
这篇关于如何绕过命令行长度的限制?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!