I downloaded a Windows application called MarkdownPad (great app!) and would like to add it to my system path so that I can open it from the command line, e.g.
> markdownpad.exe .\something.md
However, I can't find where this application is installed on disk. When I look up the application in the start menu, all I see is a .appref-ms file. Opening it up in notepad, all I see is a URL, http://markdownpad.com/download/MarkdownPad.application#MarkdownPad.application. I'm not sure exactly how this is used, but it's not really helping me figure out how to run this tool from the command line.
Is there something I can do so that I can execute this application from the command line?
If you associate .md files with MarkdownPad so that you can double-click to open them you can use the start utility to open markdown files.
That's what I do in my git repositories.
start README.md
Admittedly this only works if you name your markdown files with the .md extension.
There's probably an easier way of associating but here's what I did (Windows 7) so that I didn't have to browse to the path of Mp.
The start utility is a godsend if you're in git bash or cmd.exe. Start foo.sln launches visual studio, start foo.jpg launches your default image viewer etc.
Beat me to it :) I didn't realize you were using Powershell, so I whipped up a command file to do it. Figured I might as well post it as another option. The simplest way to make it work would be to save it as markdownpad.cmd
and throw it in your system folder.
@echo OFF
set app=C:\Users\[UserName]\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\MarkdownPad\MarkdownPad.appref-ms
if [%1]==[] (
"%app%"
goto exit
)
if exist "%~dpnx1" (
"%app%" "%~dpnx1"
goto exit
)
echo Can't find file, '%1%'
:exit
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With