Using Launchy to open executable with notepad++

1

I'm trying to find an easy way using launchy to open files via n++ that might not normally be that way. For example, if I have an authohotkey (ahk) file that I want to edit, I'd like to be able to use a script or command to launch it in notepad++.

I think there might be a way to do this with batch looking at this question, but I'm not sure how to make it so I can call it in launchy with the file name.

Eabryt

Posted 2020-01-03T21:27:01.327

Reputation: 131

1It's probably worth mentioning that you don't really need Launchy to open random files in Notepad++. The batch file linked in you original question supports simply dropping files onto it to open them in that program. The quick version of this would saving a batch file on your desktop with START notepad++ %*. – Anaksunaman – 2020-01-27T01:26:24.523

That actually helps a bunch, thank you. I'll have to mess around with it to see the best way to deal with paths, but I really appreciate the suggestion. – Eabryt – 2020-01-27T13:48:48.027

Glad I could assist. =) – Anaksunaman – 2020-01-27T22:06:35.933

Answers

1

Using the information given by Anaksunaman, I was able to come up with what appears to be a workable solution.

I created a bat file in the directory I want to search through that simply says

for /f %%i in ('dir /S /b %*') do SET FNAME=%%i
START notepad++ %FNAME%

This will search through the directory of the file as well as any subdirectories.

This isn't really directly related to Launchy, but it does work when launched through Launchy.

Eabryt

Posted 2020-01-03T21:27:01.327

Reputation: 131