T
T
trs trst2015-10-26 20:53:15
cmd/bat
trs trst, 2015-10-26 20:53:15

How to open files in cmd with non-standard programs?

For example, I want to open index.html with sublime text 3 instead of standard notepad. Windows 7

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
Ivanq, 2015-10-26
@Veyl

"C:\Program Files\Sublime Text 3\sublime_text.exe" index.html

Or, if you don't want to specify the path, put C:\Program Files\Sublime Text 3 in PATH and run sublime_text.exe index.html.
If you want even easier - create a sublime.bat file (anywhere) with the following content:
"C:\Program Files\Sublime Text 3\sublime_text.exe" %1
,
add the path to it (eg C:\Program Files\Sublime Text 3\) to PATH.
And you call:sublime index.html

M
Max, 2015-10-26
@MaxDukov

start sublime.exe index.html ?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question