在批处理文件中传递多个参数
我有一个 winform 应用程序,提示用户输入两个搜索参数。
执行时,这些参数将传递到 run.bat
文件中,即
call search.bat %1 %2
其中 %1 %2
是用户在 winform 中输入的参数。
然后,这应该将参数放入搜索 URL 的 search.bat
部分,即 -
"http://www.foo.com/search=%*"
我认为 %*
会接受添加的两个参数并进行搜索,但是对于出于某种原因,它会返回两个参数 %1
+ %2
的结果,然后只返回 %2
的结果。
是否可以对其进行编辑,以便仅返回用户输入的任何参数的结果?
I have a winform app that prompts the user to input two search parameters.
When executed these parameters are passed into a run.bat
file i.e.
call search.bat %1 %2
Where %1 %2
are the parameters that were input by the user in the winform.
This then should put the parameters into the search.bat
part of a search URL which is-
"http://www.foo.com/search=%*"
I thought that the %*
would take both parameters added and do the search but for some reason it brings back results for both parameters %1
+ %2
and then results for just %2
.
Is it possible to edit this so that it only brings back results for any parameters entered by the user?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
![扫码二维码加入Web技术交流群](/public/img/jiaqun_03.jpg)
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
事实证明,我在每次搜索后都没有清除缓存文件夹,因此旧的搜索词被提交。
Its turns out I was not clearing the cache folder after every search, therefore old search terms were being submitted.