Closed mediatechnologic closed 8 years ago
One workaround to open local files file:///c:/path/file.ext with notepad seems to be only a batch file. Here is some command line code for such a bat file:
@echo off
set para=%1%
echo para = %para%
set note=c:\insert here full path to \notepad++.exe
SETLOCAL ENABLEDELAYEDEXPANSION
set para=!para:file:///=!
set para=!para:/=\!
echo para = %para%
pause
%note% %para%
exit
This batch file has to be configured in OpenWith as new item. Apparently no parameter like "%s" is required, because the URL with file:///... is forwarded already as %1 to the batch file.
There's a way to do this through about:config
. This part of the wiki should help you out.
Thank you very much DarkTrojan. Does work now perfectly! Here is my complete setting for NotePad++ through modifications with about:config. The parameters | Name | Type | Value | are as follows::
extensions.openwith.manual.C46O4hsQ
| string
| "c:\path\notepad++.exe"
|extensions.openwith.manual.C46O4hsQ.name
| string
| notepad++
|extensions.openwith.manual.C46O4hsQ.usefilepath
| boolean
| true
|Take care, the 8 character key name (here C46O4hsQ) is different for any user and browser and of course also the specific path to the application executable. Just type "openwith.manual" in the search bar of about:config and you see all manual entries of OpenWith grouped nicely together.
BTW, the key benefit with this combined usage of local txt files in NotePad++ and FireFox with Add-On Linkification is the automatic clickable hyperlinking of all URLs. This is ideal for collecting and managing text information and URLs together (much better than any bookmark manager). Additional user defined protocols through windows registry like edit:// and path:// can extend the efficiency with clickable URLs even more.
In the past the add-on Launchy did work perfect to open any file in any application, e.g. text files with notepad++ or notepad. With add-on OpenWith I did not yet succeed, because with "%s" apparently the complete path including http:// or file:// is send to the target application. The editor does not understand this (Error: Syntax for file, directory or volume is wrong). Which syntax is required for OpenWith to send text file in the browser to the target text editor?