如何为特定命令创建快捷方式? [英] How to create shortcut for specific command?

查看:113
本文介绍了如何为特定命令创建快捷方式?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想为从"F"驱动器运行我的项目的命令创建快捷方式.
命令如下

java -jar"F:\ I m user \ Last year fun \ project \ model wise \ new \ something \ dist \ something.jar"

为此,我需要在命令提示符下将路径设置为
C:\ Program Files \ Java \ jdk1.7.0 \ bin>
然后执行上面的第一个命令.

有没有任何一种方法可以运行和执行,或者使用一个快捷方式图标来完成这两项任务?
请建议我这样做的最佳方法


Vishal Kolekar

I want to create shortcut for my command which run My project from my "F" drive.
command is as below

java -jar "F:\I m user\Last year fun\project\model wise\new\something\dist\something.jar"

For this I need to set path in Command prompt as
C:\Program Files\Java\jdk1.7.0\bin>
and then to execute above first command.

Is there any way to run and execute or do this two task with one shortcut icon?
please suggest me the best way to do this


Vishal Kolekar

推荐答案

我用谷歌搜索了"c#创建桌面快捷方式",并获得了330万个结果,其中包括:

http://www.geekpedia.com/tutorial125_Create-shortcuts-with-a-. NET-application.html [ ^ ]

Google会显示所有内容.
I googled the phrase "c# create desktop shortcut", and got back 3.3 MILLION results, among them:

http://www.geekpedia.com/tutorial125_Create-shortcuts-with-a-.NET-application.html[^]

Google reveals all.


另一种方法:创建一个文件,命名,例如说"javasomething.bat",然后在其中放置命令行-将立即起作用.

您可以使用文件作为参数.为此,请写入浴文件:

Another approach: create a file, name if, say "javasomething.bat" and place your command line in it — will work immediately.

You can use a file as a parameter; to do that, write in a bath file:

java -jar "%1"



另一个选择.忘了这个愚蠢的人(读我的嘴唇:"愚蠢")资源管理器吧!
使用一个或另一个所谓的Orthodox文件管理器,请参见 http://en.wikipedia.org/wiki/Orthodox_file_manager#Orthodox_file_managers [^ ].他们中的大多数人都像Explorer一样实现标准的Shell API,但与命令行很好地配合使用(Explorer对命令行非常不友好),并提供了方便的工具来记住,添加书签和执行命令.我使用TotalCommander( http://en.wikipedia.org/wiki/Total_Commander [ http://www.ghisler.com/ [ ^ ],共享软件).

—SA



Yet another options. Forget this stupid (read my lips: "stupid") Explorer!
Use one or another so called Orthodox file managers, see http://en.wikipedia.org/wiki/Orthodox_file_manager#Orthodox_file_managers[^]. Most of them implement standard Shell API as Explorer does but work nicely with command line (Explorer is very unfriendly to command line) and provide convenient tools to remember, bookmark and execute commands. I use TotalCommander (http://en.wikipedia.org/wiki/Total_Commander[^], http://www.ghisler.com/[^], shareware).

—SA


这篇关于如何为特定命令创建快捷方式?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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