Windows 命令提示符中的自定义命令 [英] Custom commands in windows Command Prompt

查看:29
本文介绍了Windows 命令提示符中的自定义命令的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何编写自定义命令以在 Windows 命令提示符下使用 Notepad++ 文本编辑器打开文件.

How do I write a custom command to open files with Notepad++ text editor in Windows Command prompt.

例如.

C:\Sites>ntp abc.txt

在 Notepad++ 中打开文件 abc.txt

opens the file abc.txt in Notepad++

推荐答案

创建包含此行的批处理文件

Create a batch file containing this line

@START c:\Program Files\Notepad++\notepad++.exe "%1"

并将其放入 PATH 列表中的某个目录中(或者,将带有 .bat 文件的目录添加到 PATH).

and put it into some directory that is in your PATH list (or, alternatively, add a directory with a .bat file to PATH).

这篇关于Windows 命令提示符中的自定义命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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