在批处理文件中传递多个参数

发布于 2024-12-09 05:04:37 字数 468 浏览 0 评论 0原文

我有一个 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技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

娇女薄笑 2024-12-16 05:04:37

事实证明,我在每次搜索后都没有清除缓存文件夹,因此旧的搜索词被提交。

Its turns out I was not clearing the cache folder after every search, therefore old search terms were being submitted.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文