Windows:为自定义上下文菜单项执行批处理文件

发布于 2024-09-26 21:36:37 字数 468 浏览 2 评论 0原文

我希望在特定文件类型的右键单击上下文菜单中添加新项目。我想以文件的完整路径作为参数来运行批处理文件是最简单的。我需要重命名该文件,解压缩它,然后重新压缩它,然后重命名它。我认为 winzip 命令行将是帮助解决此问题的合适工具,除非其他人有建议。

我的问题是:
- 如何根据文件类型添加自定义上下文菜单项
- 如何将文件名作为参数从上下文菜单传递给批处理文件
- 最后,这可能会分发给 2-3 个人,并且只需让安装程序为他们进行设置可能会更容易。有人知道有任何免费安装程序可以做到这一点吗?

关于我为什么要这样做的一些细节:
我有一个可以正确压缩文件的工具,但读取 zip 文件的程序似乎没有按照标准解压缩。它以 winzip 传统模式或其他模式解压缩。与其修复一个工作程序/投入时间或尝试在 Linux 服务器上进行一些超奇特、疯狂的修复以压缩为 winzip 旧格式,目前看来一种解决方法是合适的。这些过程实际上只发生在内部,但执行起来仍然很痛苦/烦人。

I am looking to add a new item in a right click context menu for a certain file type. I suppose it would be easiest to run a batch file with the full path of the file as an argument. I need to rename the file, unzip it, then rezip it, then rename it. I suppose winzip command line would be appropriate tool to help with that, unless someone else has a suggestion.

My questions are:
- How can I add a custom context menu item based on file type
- How can I pass the file name as an argument to the batch file from the context menu
- Finally this may go out to 2-3 people, and it might be easier to simply have an installer that sets this up for them. Anyone know of any free installers that could do this?

Some details about why I am trying to do this:
I have a tool that is zipping things correctly, the program that is reading the zip files is not unzipping to standards it seems. It unzips in winzip legacy mode or something. Rather than fix a working program/investing time or attempt to do some ultra-fancy, crazy fix on a linux server for zipping into winzip legacy format a workaround seemed appropriate for now. These processes only really occur internally, but they are still painful/annoying to do.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

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

评论(1

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